Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1014

Failing to connect to a replica set under load

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major - P3 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

      Attachments

        1. image.png
          image.png
          95 kB
        2. image-1.png
          image-1.png
          95 kB

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: