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

The wait queue for acquiring a connection to server is full

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Performance
    • Security Level: Public
    • Labels:
      None
    • Environment:
      Win 8.1 x64, MongoDB 2.6.7

      Description

      I wanted to try the new 2.0 async features and used the C# Driver Tutorial with the following snippet:

      Parallel.For(0, 100000, async _ =>
      {
      var e = new Entity

      { Name = "Tom" }

      ;
      await collection.InsertOneAsync(e);
      });

      But after a short period my program fails:

      Unhandled Exception:
      Unhandled Exception:
      Unhandled Exception: MongoDB.Driver.MongoWaitQueueFullException: The wait queue
      for acquiring a connection to server localhost:27017 is full.
      at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.<AcquireConnec
      tionAsync>d__0.MoveNext()
      — End of stack trace from previous location where exception was thrown —

      When I change the connectionstring to: "mongodb://localhost?maxpoolsize=20000 it seems to work, but hogs alot of memory (> 1GB Ram).

      Btw. 1.1.0 works totally fine.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              camak Casoa Makaso
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: