ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.1.0
    • Component/s: None
    • None
    • 0.25
    • Dotnet Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      According to the documentation: To calculate the maximum wait queue size, the driver multiplies WaitQueueMultiple by MaxConnectionPoolSize. If you use the default value for each option, the wait queue size will be 500.

      In reality, the queue size remains the same default value 500 when the MaxConnectionPoolSize is modified via the MongoClientSettings object, like so:

      const string connectionUri = "mongodb+srv://<u>:<p>@<host>/?retryWrites=true&w=majority&maxPoolSize=500"; 
      var settings = MongoClientSettings.FromConnectionString(connectionUri);
      settings.MaxConnectionPoolSize = 500;

      Expected Behaviour:

      [WaitQueueSize = 2500]

      Actual Behaviour:

      [WaitQueueSize = 500]

      Workaround:

      Setting maxPoolSize in the connection string does impact the queue size:

      const string connectionUri = "mongodb+srv://<u>:<p>@<host>/?retryWrites=true&w=majority&maxPoolSize=500"; 

      Or WaitQueueSize can be set explicitly, but it's a deprecated option and the approach is advised against by our documentation:

      settings.WaitQueueSize = 2500; 

      Hypothesis:

      The line

      MongoClientSettings.FromConnectionString(connectionUri); 

      appears to compute the WaitQueueSize before MaxConnectionPoolSize gets updated.

            Assignee:
            Oleksandr Poliakov
            Reporter:
            Alex Svatukhin
            None
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: