Failing to connect to a replica set under load

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.9.1
    • Component/s: None
    • None
    • Environment:
      Windows 2012
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

        1. image-1.png
          95 kB
          Miki Mullor [X]
        2. image.png
          95 kB
          Miki Mullor [X]

            Assignee:
            Unassigned
            Reporter:
            Miki Mullor [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: