<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:27 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-654] Client does not recover automatically from certain failures</title>
                <link>https://jira.mongodb.org/browse/CSHARP-654</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;We have a mongodb replica set with 1 master and 2 slaves. All slaves can be become masters.&lt;/p&gt;

&lt;p&gt;At one point the client, a Windows Service using .NET 4.0, stopped working. When I checked the logs, there was a large number of these exceptions:&lt;/p&gt;

&lt;p&gt;MongoDB.Driver.MongoConnectionException: Unable to connect to a member of the replica set matching the read preference Primary\r\n   at MongoDB.Driver.Internal.MultipleInstanceMongoServerProxy.ThrowConnectionException(ReadPreference readPreference) in c:\\projects\\mongo-csharp-driver\\Driver\\Internal&lt;br class=&quot;atl-forced-newline&quot; /&gt;MultipleInstanceMongoServerProxy.cs:line 509\r\n   at MongoDB.Driver.Internal.MultipleInstanceMongoServerProxy.Connect(TimeSpan timeout, ReadPreference readPreference) in c:\\projects\\mongo-csharp-driver\\Driver\\Internal&lt;br class=&quot;atl-forced-newline&quot; /&gt;MultipleInstanceMongoServerProxy.cs:line 224\r\n   at MongoDB.Driver.Internal.MultipleInstanceMongoServerProxy.ChooseServerInstance(ReadPreference readPreference) in c:\\projects\\mongo-csharp-driver\\Driver\\Internal&lt;br class=&quot;atl-forced-newline&quot; /&gt;MultipleInstanceMongoServerProxy.cs:line 168\r\n   at MongoDB.Driver.Internal.DiscoveringMongoServerProxy.ChooseServerInstance(ReadPreference readPreference) in c:\\projects\\mongo-csharp-driver\\Driver\\Internal&lt;br class=&quot;atl-forced-newline&quot; /&gt;DiscoveringMongoServerProxy.cs:line 126\r\n   at MongoDB.Driver.MongoServer.AcquireConnection(MongoDatabase database, ReadPreference readPreference) in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoServer.cs:line 1051\r\n   at MongoDB.Driver.MongoCursorEnumerator`1.AcquireConnection() in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoCursorEnumerator.cs:line 299\r\n   at MongoDB.Driver.MongoCursorEnumerator`1.GetFirst() in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoCursorEnumerator.cs:line 312\r\n   at MongoDB.Driver.MongoCursorEnumerator`1.MoveNext() in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoCursorEnumerator.cs:line 230\r\n   at System.Linq.Enumerable.FirstOrDefault&lt;span class=&quot;error&quot;&gt;&amp;#91;TSource&amp;#93;&lt;/span&gt;(IEnumerable`1 source)\r\n   at MongoDB.Driver.MongoCollection.FindOneAs&lt;span class=&quot;error&quot;&gt;&amp;#91;TDocument&amp;#93;&lt;/span&gt;(IMongoQuery query) in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoCollection.cs:line 570\r\n   at MongoDB.Driver.MongoCollection.RunCommandAs(Type commandResultType, IMongoCommand command) in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoCollection.cs:line 1658\r\n   at MongoDB.Driver.MongoCollection.RunCommandAs(Type commandResultType, IMongoCommand command) in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoCollection.cs:line 1680\r\n   at MongoDB.Driver.MongoCollection.RunCommandAs&lt;span class=&quot;error&quot;&gt;&amp;#91;TCommandResult&amp;#93;&lt;/span&gt;(IMongoCommand command) in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoCollection.cs:line 1650\r\n   at MongoDB.Driver.MongoCollection.FindAndModify(IMongoQuery query, IMongoSortBy sortBy, IMongoUpdate update, IMongoFields fields, Boolean returnNew, Boolean upsert) in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoCollection.cs:line 461\r\n   at MongoDB.Driver.MongoCollection.FindAndModify(IMongoQuery query, IMongoSortBy sortBy, IMongoUpdate update, Boolean returnNew, Boolean upsert) in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoCollection.cs:line 440\r\n   at MongoDB.Driver.MongoCollection.FindAndModify(IMongoQuery query, IMongoSortBy sortBy, IMongoUpdate update, Boolean returnNew) in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoCollection.cs:line 421\r\n   at MongoDB.Driver.MongoCollection.FindAndModify(IMongoQuery query, IMongoSortBy sortBy, IMongoUpdate update) in c:\\projects\\mongo-csharp-driver\\Driver\\Core&lt;br class=&quot;atl-forced-newline&quot; /&gt;MongoCollection.cs:line 404\r\n&lt;br/&gt;
...&lt;br/&gt;
(Note that the actual read preference of the collection is ReadPreferenceMode.Secondary, but that has not caused any problems with FindAndModify until now)&lt;/p&gt;

&lt;p&gt;We were not able to see anything wrong with the replica set itself, so we simply restarted the client. The exceptions immediately went away and the client continued to work perfectly fine after that.&lt;/p&gt;

&lt;p&gt;I cannot determine what caused the client to begin throwing those exceptions. It might have been some temporary network failure. The real problem is that the driver was not able to recover from that failure by itself. I would expect the driver to be more robust and to be able to resume normal operation without the need for a restart.&lt;/p&gt;

&lt;p&gt;Is there a code workaround for this issue? Would it help if we set the Read preference mode to SecodaryPreferred or to Primary?&lt;/p&gt;



</description>
                <environment>The client is a Windows Service using .NET 4.0 and running on Windows Server 2003 R2</environment>
        <key id="60310">CSHARP-654</key>
            <summary>Client does not recover automatically from certain failures</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="craig.wilson@mongodb.com">Craig Wilson</assignee>
                                    <reporter username="kalin.gyokov">Kalin Gyokov</reporter>
                        <labels>
                            <label>driver</label>
                    </labels>
                <created>Tue, 25 Dec 2012 00:27:54 +0000</created>
                <updated>Thu, 20 Mar 2014 14:36:17 +0000</updated>
                            <resolved>Fri, 15 Mar 2013 17:40:27 +0000</resolved>
                                    <version>1.6.1</version>
                                    <fixVersion>1.8</fixVersion>
                                                        <votes>1</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="290278" author="auto" created="Fri, 15 Mar 2013 17:39:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2013-03-15T17:16:47Z&apos;, u&apos;name&apos;: u&apos;Craig Wilson&apos;, u&apos;email&apos;: u&apos;craiggwilson@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-654&quot; title=&quot;Client does not recover automatically from certain failures&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-654&quot;&gt;&lt;del&gt;CSHARP-654&lt;/del&gt;&lt;/a&gt;: fixed bug for when network reliability causes us to miss a reconnection by one of the members.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/2f316c7eec9382bdf823e9197a5c284777a6cbc1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/2f316c7eec9382bdf823e9197a5c284777a6cbc1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="240194" author="stefanoric" created="Tue, 15 Jan 2013 09:13:02 +0000"  >&lt;p&gt;Craig, &lt;/p&gt;

&lt;p&gt;removing the disconnect from the code resolved the issue for us both for &quot;primary only&quot; and &quot;replica set&quot; mode.&lt;/p&gt;

&lt;p&gt;Thank you for helping root causing our problem and keep up with the good work!&lt;/p&gt;</comment>
                            <comment id="239545" author="kalin.gyokov" created="Mon, 14 Jan 2013 18:26:22 +0000"  >&lt;p&gt;So far we have only seen this once. We will keep monitoring the service in case it happens again. Maybe we&apos;ll be able to reproduce it in our dev environment.&lt;/p&gt;</comment>
                            <comment id="239532" author="craiggwilson" created="Mon, 14 Jan 2013 18:11:17 +0000"  >&lt;p&gt;I agree that these are different issues and as such I will leave this opened.  &lt;/p&gt;

&lt;p&gt;I have been unable to produce your issue Kalin.  I&apos;ve performed the steps you have just described a number of times and the primary always shows back up.  Was this an isolated occurence or is this happening frequently?&lt;/p&gt;</comment>
                            <comment id="239515" author="kalin.gyokov" created="Mon, 14 Jan 2013 18:03:09 +0000"  >&lt;p&gt;It appears that there may be two separate issues. Stefano says that &quot;under a somewhat increased load &lt;span class=&quot;error&quot;&gt;&amp;#91;the driver&amp;#93;&lt;/span&gt; cannot connect to the server for &lt;b&gt;some&lt;/b&gt; of the concurrent requests&quot;. &lt;br/&gt;
In my case, the driver &lt;b&gt;completely&lt;/b&gt; fails to come back up until the client is restarted. It also appears that Stefano is using Connect and Disconnect. In our code, we simply instantiate a MongoCollection &lt;b&gt;once&lt;/b&gt; when the client Windows Service is started. We then call FindAndMofiy at a rate of 3-10 times per second. Here is pretty much how we instantiate our collection:&lt;/p&gt;

&lt;p&gt;var ourConnStr = &quot;mongodb://MONGO01,MONGO02,MONGO03/OurDatabase&quot;;&lt;br/&gt;
var ourDb = MongoDatabase.Create( ourConnStr );&lt;br/&gt;
var ourColl = ourDb.GetCollection( &quot;OurCollection&quot; );&lt;br/&gt;
Then we just call ourColl.FindAndModify(...) on that instance a few times per second. There is nothing more to it.&lt;/p&gt;

&lt;p&gt;Here is a summary of what &lt;b&gt;might&lt;/b&gt; have happened, based on the logs. You are probably already aware of this, but I just wanted to summarize it:&lt;br/&gt;
1. The connection between all replicas failed.&lt;br/&gt;
2. For a few minutes, there was no primary since each replica was isolated from the rest.&lt;br/&gt;
3. When the network came back up, the driver was able to immediately connect to the set. However, it could not find a primary because one had not yet been elected and therefore the driver failed.&lt;br/&gt;
4. The replica set re-elected the original primary (MONGO01). However, the driver was unable to detect that and continued to fail as if there was no primary yet.&lt;/p&gt;

</comment>
                            <comment id="239486" author="craiggwilson" created="Mon, 14 Jan 2013 17:32:35 +0000"  >&lt;p&gt;Yes.  A replica set connection creates N connection pools where N is the number of members in your replica set.  Hence, setting up and tearing these down is much more expensive.&lt;/p&gt;</comment>
                            <comment id="239402" author="stefanoric" created="Mon, 14 Jan 2013 16:15:08 +0000"  >&lt;p&gt;Ok, I&apos;ll schedule this change ASAP. &lt;/p&gt;

&lt;p&gt;Do you think this might explain the difference in performance between the &quot;replica-set mode&quot; and the &quot;primary only mode&quot;?&lt;/p&gt;</comment>
                            <comment id="239367" author="craiggwilson" created="Mon, 14 Jan 2013 15:43:31 +0000"  >&lt;p&gt;Ok, the config looks fine.  I was concerned fsync was turned on or replicasToWrite was high.&lt;/p&gt;

&lt;p&gt;I&apos;d suggest changing the code to get rid of the disconnect calls.  Effectively, all this means is to get rid of the finally blocks.  After that is done, please report back and let us know whether that corrected the problem.  &lt;/p&gt;</comment>
                            <comment id="239364" author="stefanoric" created="Mon, 14 Jan 2013 15:39:36 +0000"  >&lt;p&gt;We pretty much used that code as is. We might have to rewrite part of this code then. &lt;/p&gt;

&lt;p&gt;The relevant sections from the web.config should be as follow:&lt;br/&gt;
	&amp;lt;connectionStrings&amp;gt;&lt;br/&gt;
		&amp;lt;add name=&quot;MongoSessionServices&quot; connectionString=&quot;mongodb://454575-app1:27017,454576-app2:27017,406734-fdproc3:27017/?replicaSet=ump_replSet&quot; /&amp;gt;&lt;br/&gt;
	&amp;lt;/connectionStrings&amp;gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;&lt;br/&gt;
		&amp;lt;sessionState mode=&quot;Custom&quot; customProvider=&quot;MongoSessionStateProvider&quot;&amp;gt;&lt;br/&gt;
			&amp;lt;providers&amp;gt;&lt;br/&gt;
				&amp;lt;add name=&quot;MongoSessionStateProvider&quot; type=&quot;MongoSessionStateStore.MongoSessionStateStore&quot; connectionStringName=&quot;MongoSessionServices&quot; writeExceptionsToEventLog=&quot;false&quot; fsync=&quot;false&quot; replicasToWrite=&quot;0&quot; /&amp;gt;&lt;br/&gt;
			&amp;lt;/providers&amp;gt;&lt;br/&gt;
		&amp;lt;/sessionState&amp;gt;&lt;/p&gt;
</comment>
                            <comment id="239352" author="craiggwilson" created="Mon, 14 Jan 2013 15:28:29 +0000"  >&lt;p&gt;Have you modified this session store code at all?  With the assumption that you have not...&lt;/p&gt;

&lt;p&gt;The problem I&apos;m seeing is the call to conn.Disconnect().  You can search in the code here (&lt;a href=&quot;https://github.com/AdaTheDev/MongoDB-ASP.NET-Session-State-Store/blob/master/MongoSessionStateStore/MongoSessionStateStore.cs#L286&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/AdaTheDev/MongoDB-ASP.NET-Session-State-Store/blob/master/MongoSessionStateStore/MongoSessionStateStore.cs#L286&lt;/a&gt;) for Disconnect and see 6 places it is used.  &lt;/p&gt;

&lt;p&gt;You can see my blog post on what Disconnect is and why it is generally a bad idea to invoke here: &lt;a href=&quot;http://craiggwilson.wordpress.com/2012/09/23/disconnecting-with-the-mongodb-driver/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://craiggwilson.wordpress.com/2012/09/23/disconnecting-with-the-mongodb-driver/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically, everytime a new request comes in, a new connection is created and begins to be used.  However, concurrently with that, another request could have killed off all connections.  Hence, you are reaping any benefits of a connection pool that can scale to handle the load.&lt;/p&gt;

&lt;p&gt;Let me know if you have changed this code at all?  Also, what does your web.config look like?&lt;/p&gt;</comment>
                            <comment id="239302" author="stefanoric" created="Mon, 14 Jan 2013 14:29:47 +0000"  >&lt;p&gt;Our session provider is based on the following code:&lt;br/&gt;
&lt;a href=&quot;https://github.com/AdaTheDev/MongoDB-ASP.NET-Session-State-Store&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/AdaTheDev/MongoDB-ASP.NET-Session-State-Store&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am attaching you a sample page that clients are loading (Ping.aspx).&lt;/p&gt;

&lt;p&gt;Clients run in the cloud (Amazon). They are based on an internal load testing tool (based on node.js) which unfortunately I cannot share &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/sad.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Nothing fancy anyway, they just issue HTTP requests to the aspx page and sleep for a random interval between 1 and 3 seconds. Each thread issues 100K requests before stopping. For my tests I had run 175 concurrent threads.&lt;/p&gt;

&lt;p&gt;Hope this helps.&lt;/p&gt;


</comment>
                            <comment id="239289" author="craiggwilson" created="Mon, 14 Jan 2013 14:15:15 +0000"  >&lt;p&gt;It may be the same issue.  Can I ask you for your sample program, both the web page as well as the client?.  I just spun up 300 threads and, once again, was unable to make it fail...&lt;/p&gt;</comment>
                            <comment id="239160" author="stefanoric" created="Mon, 14 Jan 2013 10:10:50 +0000"  >&lt;p&gt;Some data from my tests:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;175 threads, each calling a sample ASP page 100K times using a session handled by Mongo&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;With connection string pointing to replica set:&lt;br/&gt;
7356 errors due to &quot;Unable to connect&quot;&lt;/p&gt;

&lt;p&gt;With connection string pointing to primary only:&lt;br/&gt;
226 errors due to &quot;Unable to connect&quot;&lt;/p&gt;

&lt;p&gt;There seems to be something about connecting to the replica set that make errors soar.&lt;/p&gt;</comment>
                            <comment id="239107" author="stefanoric" created="Mon, 14 Jan 2013 08:54:05 +0000"  >&lt;p&gt;Craig,&lt;/p&gt;

&lt;p&gt;my problem is not that the driver does not pick up the primary again, but that under a somewhat increased load it cannot connect to the server for &lt;b&gt;some&lt;/b&gt; of the concurrent requests.&lt;/p&gt;

&lt;p&gt;I am trying now with a connection string pointing directly to the primary server to see whether this makes any difference.&lt;/p&gt;

&lt;p&gt;As I mentioned in my first comment, this might not be the same issue as the original poster.&lt;/p&gt;</comment>
                            <comment id="237707" author="craiggwilson" created="Fri, 11 Jan 2013 23:34:25 +0000"  >&lt;p&gt;So, I&apos;ve spent most of day trying to reproduce this.  While I have found some interesting behavior I&apos;m going to fix, the primary always comes back.  The unusual behavior is the amount of time it takes to for this to happen, but as I said, the driver always picks up the primary again, the errors stop, and normal function resumes.  Also, using a SecondaryPreferred ReadPreference shows me that a read query almost never fails, so this is only a problem for writes.&lt;/p&gt;

&lt;p&gt;I&apos;m going to keep trying this weekend, but if either of you are able to get a sample program up that shows the Primary never coming back, it be immensely helpful.&lt;/p&gt;</comment>
                            <comment id="237195" author="stefanoric" created="Fri, 11 Jan 2013 14:42:45 +0000"  >&lt;p&gt;Craig,&lt;/p&gt;

&lt;p&gt;driver version is 1.7.0.4714&lt;br/&gt;
mongo version is 2.2.0&lt;/p&gt;

&lt;p&gt;Connection string: mongodb://454575-app1:27017,454576-app2:27017,406734-fdproc3:27017/?replicaSet=ump_replSet&lt;/p&gt;

&lt;p&gt;the scenario ~150 client threads which sleep randomly for 1 to 3 seconds and then issues a request to a web server which uses Mongo to store session data.&lt;br/&gt;
After running for a few seconds some of the requests (not all of them) fail with the following stack trace:&lt;/p&gt;


&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;MongoConnectionException: Unable to connect to a member of the replica set matching the read preference Primary&amp;#93;&lt;/span&gt;&lt;br/&gt;
   MongoDB.Driver.Internal.MultipleInstanceMongoServerProxy.ThrowConnectionException(ReadPreference readPreference) in C:\build\mongo-csharp-driver\Driver\Internal\MultipleInstanceMongoServerProxy.cs:509&lt;br/&gt;
   MongoDB.Driver.Internal.MultipleInstanceMongoServerProxy.Connect(TimeSpan timeout, ReadPreference readPreference) in C:\build\mongo-csharp-driver\Driver\Internal\MultipleInstanceMongoServerProxy.cs:224&lt;br/&gt;
   MongoDB.Driver.Internal.MultipleInstanceMongoServerProxy.ChooseServerInstance(ReadPreference readPreference) in C:\build\mongo-csharp-driver\Driver\Internal\MultipleInstanceMongoServerProxy.cs:168&lt;br/&gt;
   MongoDB.Driver.MongoServer.AcquireConnection(MongoDatabase database, ReadPreference readPreference) in C:\build\mongo-csharp-driver\Driver\Core\MongoServer.cs:1057&lt;br/&gt;
   MongoDB.Driver.MongoCollection.Update(IMongoQuery query, IMongoUpdate update, MongoUpdateOptions options) in C:\build\mongo-csharp-driver\Driver\Core\MongoCollection.cs:1549&lt;br/&gt;
   MongoDB.Driver.MongoCollection.Update(IMongoQuery query, IMongoUpdate update, WriteConcern writeConcern) in C:\build\mongo-csharp-driver\Driver\Core\MongoCollection.cs:1575&lt;br/&gt;
   MongoSessionStateStore.MongoSessionStateStore.GetSessionStoreItem(Boolean lockRecord, HttpContext context, String id, Boolean&amp;amp; locked, TimeSpan&amp;amp; lockAge, Object&amp;amp; lockId, SessionStateActions&amp;amp; actionFlags) +3537&lt;br/&gt;
   MongoSessionStateStore.MongoSessionStateStore.GetItemExclusive(HttpContext context, String id, Boolean&amp;amp; locked, TimeSpan&amp;amp; lockAge, Object&amp;amp; lockId, SessionStateActions&amp;amp; actionFlags) +258&lt;br/&gt;
   System.Web.SessionState.SessionStateModule.GetSessionStateItem() +115&lt;br/&gt;
   System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +768&lt;br/&gt;
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +96&lt;br/&gt;
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp;amp; completedSynchronously) +184&lt;/p&gt;

&lt;p&gt;See attachment &quot;primary.txt&quot; above.&lt;/p&gt;</comment>
                            <comment id="237139" author="craiggwilson" created="Fri, 11 Jan 2013 13:20:15 +0000"  >&lt;p&gt;Stefano, do you have your logs?  Also, could you answer the questions in my previous comment?  Also, could you post your connection string (changing anything sensitive).&lt;/p&gt;</comment>
                            <comment id="237067" author="stefanoric" created="Fri, 11 Jan 2013 10:56:21 +0000"  >&lt;p&gt;Upvoted since I am experiencing similar issues under heavy load. Not 100% sure it&apos;s the same issue, but I want to keep this in my radar.&lt;/p&gt;</comment>
                            <comment id="223634" author="craiggwilson" created="Tue, 25 Dec 2012 00:39:36 +0000"  >&lt;p&gt;The driver should have responded correctly.  We test scenarios like this and our tests are passing.  There, of course, might be some scenarios we failed to test and you happened to hit one of them.  Changing your read preference should not affect this at all.  All writes go to primary, regardless of your read preference.  FindAndModify qualifies as a write even though there is a query component.&lt;/p&gt;

&lt;p&gt;1) What driver version are you using?&lt;br/&gt;
2) What version of mongodb are you running?&lt;br/&gt;
3) Can you attach the server logs for all your replica set members from right before the initial exception was thrown to a little bit after a new primary was reelected?&lt;/p&gt;

&lt;p&gt;Thanks for reporting...&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="78467">CSHARP-754</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="64800">CSHARP-678</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="23117" name="Ping.aspx" size="548" author="stefanoric" created="Mon, 14 Jan 2013 14:30:21 +0000"/>
                            <attachment id="22818" name="mongo01.txt" size="87822" author="kalin.gyokov" created="Thu, 27 Dec 2012 00:13:52 +0000"/>
                            <attachment id="22819" name="mongo02.txt" size="91323" author="kalin.gyokov" created="Thu, 27 Dec 2012 00:13:52 +0000"/>
                            <attachment id="22820" name="mongo03.txt" size="93019" author="kalin.gyokov" created="Thu, 27 Dec 2012 00:13:52 +0000"/>
                            <attachment id="23085" name="primary.txt" size="396032" author="stefanoric" created="Fri, 11 Jan 2013 14:43:01 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrl8pz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>37772</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>