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

Wait Queue Size setting doesn't affect the server selection wait queue size.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.0.1, 2.1
    • Affects Version/s: 2.0
    • Component/s: None
    • None

      Currently, the wait queue size doesn't affect the server selection wait queue size. We either need to start setting it, or determine a different way to handle queuing (or lack thereof) in the server selection loop.

      Workaround

      const int maxWaitQueueSize = 5000; // set this to a value that is appropriate
      var settings = new MongoClientSettings();
      
      settings.WaitQueueSize = maxWaitQueueSize;
      
      // this is the workaround for the bug.
      settings.ClusterConfigurator = cb =>
      {
      	cb.ConfigureCluster(cs => cs.With(maxServerSelectionWaitQueueSize = maxWaitQueueSize ));
      };
      

            Assignee:
            craig.wilson@mongodb.com Craig Wilson
            Reporter:
            craig.wilson@mongodb.com Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: