<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:36:44 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-408] WaitQueueTimeout default value</title>
                <link>https://jira.mongodb.org/browse/CSHARP-408</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;In our production, when MongoDB server is close to hitting I/O subsystem limits (we have a write-intensive application that makes MongoDB spend much time write-locked, but that&apos;s another story), the mean query execution time starts to raise when MongoDB flushes the maps (every 60 secs by default), which is completely expected. This, of course, leads to additional connections being opened, because requests still arrive at a steady pace. If the aforementioned flush takes about a second (yes, I know this isn&apos;t a healthy value, but currently we have to stick with this), the connection pool overflows and our backend threads begin getting TimeoutException (hopefully &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-393&quot; title=&quot;MongoConnectionPool should throw some kind of MongoException (MongoConnectionException?) instead of TimeoutException&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-393&quot;&gt;&lt;del&gt;CSHARP-393&lt;/del&gt;&lt;/a&gt; would changed that to something more expected), since they&apos;re hitting the wait queue timeout. &lt;/p&gt;

&lt;p&gt;I wonder why WaitQueueTimeout is so low by default (500ms)? If the connection pool is close to exhaustion because of an intermittent slowdown due to disk flush, LVM snapshotting, OS cache pollution, etc., most of the threads just won&apos;t make it in 500ms. If there is no reason for it to be so low, I propose it to become 1/2 of connection timeout, which would translate to 15 seconds. &lt;/p&gt;

&lt;p&gt;While I understand that in the case of severe server slowdown this increase would lead to a lot of hanging threads, in typical parallel client scenarios (ASP.NET, WCF services, etc.), these threads would be provided from thread pool that has an effective limit that depends on the amount of processors, so it would not oversaturate the OS with excessive amount of threads and won&apos;t exhaust memory with thread stacks. The benefits of increasing are clear &amp;#8211; 1-2 second server &quot;lag&quot; would not abort like half of requests (our scenario) just because connection pool was saturated at that time.&lt;/p&gt;

&lt;p&gt;I also understand that we can set it on per-database basis in client code, but I still recommend that &lt;em&gt;default&lt;/em&gt; should be changed, people with low loads won&apos;t notice the change, and people that are close to their servers&apos; capacity would not hit the truckload of TimeoutExceptions in their face =)&lt;/p&gt;

&lt;p&gt;Of course, it may be that I miss some point that justifies the default low value, sorry to bother you with this if I really missed something.&lt;/p&gt;</description>
                <environment></environment>
        <key id="32688">CSHARP-408</key>
            <summary>WaitQueueTimeout default value</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="onyxmaster">Aristarkh Zagorodnikov</reporter>
                        <labels>
                    </labels>
                <created>Sun, 11 Mar 2012 09:12:02 +0000</created>
                <updated>Thu, 2 Apr 2015 18:28:06 +0000</updated>
                            <resolved>Thu, 15 Mar 2012 02:10:19 +0000</resolved>
                                    <version>1.3.1</version>
                                    <fixVersion>1.4</fixVersion>
                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="98406" author="onyxmaster" created="Tue, 13 Mar 2012 19:03:56 +0000"  >&lt;p&gt;I think that relatively large timeout that&apos;s uniform across different drivers would be very good (not mentioning that 2 minutes is more than enough to sort out our problems).&lt;/p&gt;</comment>
                            <comment id="98356" author="rstam" created="Tue, 13 Mar 2012 17:02:33 +0000"  >&lt;p&gt;So the proposed fix is to change the default values to be the same as those used by the Java driver:&lt;/p&gt;

&lt;p&gt;WaitQueueMultiple = 5.0&lt;br/&gt;
WaitQueueTimeout = 2 minutes&lt;/p&gt;</comment>
                            <comment id="98353" author="rstam" created="Tue, 13 Mar 2012 16:51:59 +0000"  >&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Corrected&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The default value of WaitQueueTimeout in the Java driver is 2 minutes, and I am told that is working well for most people. We would like the default value to match across drivers. Also, the Java driver has a default WaitQueueMultiplier of 5 instead of 1, which means many more threads can be waiting.&lt;/p&gt;

&lt;p&gt;Would a default value of 2 minutes work for you?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrh7wn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14080</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>