Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major - P3
-
None
-
1.9.1
-
None
-
None
-
Windows 2012
Description
under some load (~100 concurrent threads), the driver throws the following exception:
"MESSAGE: Unable to connect to a member of the replica set matching the read preference Primary
STACKTRACE: at MongoDB.Driver.Internal.MultipleInstanceMongoServerProxy.ThrowConnectionException(ReadPreference readPreference)
at MongoDB.Driver.Internal.MultipleInstanceMongoServerProxy.Connect(TimeSpan timeout, ReadPreference readPreference)
at MongoDB.Driver.Internal.MultipleInstanceMongoServerProxy.ChooseServerInstance(ReadPreference readPreference)
at MongoDB.Driver.MongoServer.AcquireConnection(MongoDatabase database, ReadPreference readPreference)
at MongoDB.Driver.MongoCursorEnumerator`1.AcquireConnection()
at MongoDB.Driver.MongoCursorEnumerator`1.GetFirst()
at MongoDB.Driver.MongoCursorEnumerator`1.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at MongoDB.Driver.MongoCollection.FindOneAs[TDocument](IMongoQuery query)
at MongoDB.Driver.MongoCollection`1.FindOne(IMongoQuery query)
if we remove the replica set from the connection, the problem goes away.
I saw another issue mentioning this problem where removing "disconnect" solves the issue. we don't use disconnect.
this is a blocking issue