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

Sudden burst of "Exception = 'MongoDB.Driver.MongoConnectionException: Too many threads are already waiting for a connection."

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None

    Description

      Hi,

      Our ecosystem uses MongoDB as preferred storage engine (we are running 3.2 Enterprise version server) and c# driver 1.11. From last two days our system is throwing exceptions to establish connection
      And it says "MongoDB.Driver.MongoConnectionException: Too many threads are already waiting for a connection."

      We are using all default settings for establishing the connection.

      After googling for a while, people suggested to increase the "MaxConnectionPoolSize" & "WaitQueueSize" settings, what are the ideal settings?

      Regards
      Manju

      [Exception = 'MongoDB.Driver.MongoConnectionException: Too many threads are already waiting for a connection.
      Server stack trace:
      at MongoDB.Driver.Internal.MongoConnectionPool.AcquireConnection(AcquireConnectionOptions options) in d:\jenkins\workspace\mongo-csharp-driver-1.x-build\MongoDB.Driver\Communication\MongoConnectionPool.cs:line 97
      at MongoDB.Driver.MongoServerInstance.AcquireConnection() in d:\jenkins\workspace\mongo-csharp-driver-1.x-build\MongoDB.Driver\Communication\MongoServerInstance.cs:line 465
      at MongoDB.Driver.MongoServer.AcquireConnection(ReadPreference readPreference) in d:\jenkins\workspace\mongo-csharp-driver-1.x-build\MongoDB.Driver\MongoServer.cs:line 964
      at MongoDB.Driver.MongoCursor`1.MongoCursorConnectionProvider.AcquireConnection() in d:\jenkins\workspace\mongo-csharp-driver-1.x-build\MongoDB.Driver\MongoCursor.cs:line 1049
      at MongoDB.Driver.Operations.QueryOperation`1.GetFirstBatch(IConnectionProvider connectionProvider) in d:\jenkins\workspace\mongo-csharp-driver-1.x-build\MongoDB.Driver\Operations\QueryOperation.cs:line 112
      at MongoDB.Driver.Operations.QueryOperation`1.Execute(IConnectionProvider connectionProvider) in d:\jenkins\workspace\mongo-csharp-driver-1.x-build\MongoDB.Driver\Operations\QueryOperation.cs:line 77
      at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            manjunath.bhuyar@hp.com Manjunath Bhuyar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: