<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:46:54 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>[SERVER-37752] possible bug in the server (ignoring timeout, using hardcoded timeout,..) ?</title>
                <link>https://jira.mongodb.org/browse/SERVER-37752</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;hello together,&lt;br/&gt;
im experiencing weird timeouts from mongodb or the perl driver, but i guess its the server. i already tried to debug and track down whats happening(also searched the perl driver for any occurence of this timeout)&lt;/p&gt;

&lt;p&gt;it seems its some hardcoded 20 second timeout..&lt;/p&gt;


&lt;p&gt;i got to this conclusion through my scripts.. they end up like this:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Thu Oct 25 01:26:57 2018&amp;#93;&lt;/span&gt; update_one @ collection foo..&lt;br/&gt;
 MongoDB::WriteError: Write results unavailable from 192.168.91.187:5000 due to Couldn&apos;t get a connection within the time limit&lt;br/&gt;
 script exit at: Don Okt 25 01:27:18 CEST 2018&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;and that works exactly like this:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;print &quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot; . scalar localtime . &amp;quot;&amp;#93;&lt;/span&gt; collection (foo)..\n&quot;;&lt;br/&gt;
 my $col=$con-&amp;gt;get_database(&quot;foo&quot;)-&amp;gt;get_collection(&quot;foo&quot;); &lt;/p&gt;

&lt;p&gt; print &quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot; . scalar localtime . &amp;quot;&amp;#93;&lt;/span&gt; update_one @ collection foo..\n&quot;;&lt;br/&gt;
 $col-&amp;gt;update_one({&quot;foo&quot; =&amp;gt; foo},{&apos;$addToSet&apos; =&amp;gt; { &quot;foo&quot; =&amp;gt; foo }}); &amp;lt;= kills the script&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;so the difference between the update call and the script exit is everytime 20 seconds..&lt;/p&gt;

&lt;p&gt;it happens not only with addtoset.&lt;/p&gt;

&lt;p&gt;i already connect to the the server with very high timeout values (for exact this debug purpose):&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;$con= MongoDB::MongoClient-&amp;gt;new(&lt;br/&gt;
 host =&amp;gt; $constr,&lt;br/&gt;
 connect_timeout_ms =&amp;gt; 1000 * 60 * 10, #10 minutes&lt;br/&gt;
 max_time_ms =&amp;gt; 1000 * 60 * 60 * 3, #3 hours (max time for operation)&lt;br/&gt;
 server_selection_timeout_ms =&amp;gt; 1000 * 60 * 60 * 1, #1 hour&lt;br/&gt;
 socket_timeout_ms =&amp;gt; 1000 * 60 * 60 * 4, #4 hours (wait for reply)&lt;br/&gt;
 server_selection_try_once =&amp;gt; 0,&lt;br/&gt;
 w =&amp;gt; 1,&lt;br/&gt;
 wtimeout =&amp;gt; 1000 * 60 * 60 * 1, #1 hour&lt;br/&gt;
 j =&amp;gt; 0 );&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;so the question is, where does this timeout come from and what can i do, except from try/catch to prevent these errors?&lt;/p&gt;

&lt;p&gt;im using MongoDB 3.6.5, and the Perl Driver 2.0.1 at Debian Stable.&lt;/p&gt;

&lt;p&gt;kind regards,&lt;br/&gt;
Michael&lt;/p&gt;</description>
                <environment></environment>
        <key id="624294">SERVER-37752</key>
            <summary>possible bug in the server (ignoring timeout, using hardcoded timeout,..) ?</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="daniel.hatcher@mongodb.com">Danny Hatcher</assignee>
                                    <reporter username="nelson.kingsley@gmx.at">Michael Adamcik</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Oct 2018 18:41:06 +0000</created>
                <updated>Thu, 1 Nov 2018 18:09:48 +0000</updated>
                            <resolved>Thu, 1 Nov 2018 18:09:48 +0000</resolved>
                                    <version>3.6.5</version>
                                                    <component>Internal Code</component>
                    <component>Networking</component>
                    <component>Replication</component>
                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="2049257" author="daniel.hatcher" created="Thu, 1 Nov 2018 18:09:40 +0000"  >&lt;p&gt;Hello Mike,&lt;/p&gt;

&lt;p&gt;I&apos;m glad to hear it. Please note that these timings are longer than what most of our customers use so you may wish to investigate you infrastructure to determine if there are any upgrades that you can make to improve performance.&lt;/p&gt;

&lt;p&gt;As this is not a bug in MongoDB, I will close this SERVER ticket.&lt;/p&gt;

&lt;p&gt;Thank you,&lt;/p&gt;

&lt;p&gt;Danny&lt;/p&gt;</comment>
                            <comment id="2049134" author="nelson.kingsley@gmx.at" created="Thu, 1 Nov 2018 16:30:00 +0000"  >&lt;p&gt;Hello Danny,&lt;/p&gt;

&lt;p&gt;Im testing now with a second mongos instance having adjusted parameters:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;shardedConnPoolIdleTimeoutMinutes=10&lt;br/&gt;
 globalConnPoolIdleTimeoutMinutes=10&lt;br/&gt;
 ShardingTaskExecutorPoolRefreshTimeoutMS=60000&lt;br/&gt;
 ShardingTaskExecutorPoolMinSize=4&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Seems to solve the issue so far.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;/p&gt;

&lt;p&gt;Mike&lt;/p&gt;</comment>
                            <comment id="2044881" author="daniel.hatcher" created="Mon, 29 Oct 2018 14:58:55 +0000"  >&lt;p&gt;Hello Michael,&lt;/p&gt;

&lt;p&gt;Yes it appears that this is not an issue with the Perl driver and is instead a problem with overloaded `mongod` instances. As you pointed out in your original description that the timeout was always 20 seconds, I would start with &lt;a href=&quot;https://docs.mongodb.com/v3.6/reference/parameters/#param.ShardingTaskExecutorPoolRefreshTimeoutMS&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;shardingTaskExecutorPoolRefreshTimeoutMS&lt;/a&gt;. If you change that to 30 seconds and then start seeing the errors in your application at a 30 second interval, that should prove it.&lt;/p&gt;

&lt;p&gt;Can you test that change now?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Danny&lt;/p&gt;</comment>
                            <comment id="2044111" author="nelson.kingsley@gmx.at" created="Sat, 27 Oct 2018 07:47:07 +0000"  >&lt;p&gt;Hello again,&lt;/p&gt;

&lt;p&gt;a little update:&lt;/p&gt;

&lt;p&gt;i know my mongod instances experience some heavy-load situations, where the storage becomes the bottleneck (high iowait)..maybe in such situations the mongod processes become unable to accepting new connections.&lt;/p&gt;

&lt;p&gt;so, after seeing the log, im trying now some options from &lt;a href=&quot;https://docs.mongodb.com/v3.6/reference/parameters/#sharding-parameters&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/v3.6/reference/parameters/#sharding-parameters&lt;/a&gt;&#160;(connection count, idle time,...)&lt;/p&gt;

&lt;p&gt;if they help, its not a bug i guess....&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;your help and support is still highly appreciated!&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;/p&gt;

&lt;p&gt;michael&lt;/p&gt;</comment>
                            <comment id="2044063" author="nelson.kingsley@gmx.at" created="Fri, 26 Oct 2018 23:32:19 +0000"  >&lt;p&gt;Hello Danny,&#160;&lt;/p&gt;

&lt;p&gt;it just happend again, i uploaded the log of the mongos instance. The fun begins at&#160;2018-10-26T20:53:52&lt;/p&gt;

&lt;p&gt;Thank you,&lt;/p&gt;

&lt;p&gt;Michael&lt;/p&gt;</comment>
                            <comment id="2043714" author="daniel.hatcher" created="Fri, 26 Oct 2018 18:30:21 +0000"  >&lt;p&gt;Hello Michael,&lt;/p&gt;

&lt;p&gt;Unfortunately, I am unable to reproduce this problem on my own environment. Are you able to reproduce this issue consistently with a test script or is it something that you are only occasionally seeing as part of your main scripts? If you are connecting via a &lt;tt&gt;mongos&lt;/tt&gt; node, it is possible that the error is actually at that level and is simply bubbling up to the driver. As you mentioned, I believe the &lt;tt&gt;mongos&lt;/tt&gt; and &lt;tt&gt;mongod&lt;/tt&gt; logs will be the key to resolving this problem. Can you upload a copy of the problem &lt;tt&gt;mongos&lt;/tt&gt; and Primary &lt;tt&gt;mongod&lt;/tt&gt; logs if it happens again?&lt;/p&gt;

&lt;p&gt;Thank you,&lt;/p&gt;

&lt;p&gt;Danny&lt;/p&gt;</comment>
                            <comment id="2042424" author="nelson.kingsley@gmx.at" created="Thu, 25 Oct 2018 18:52:53 +0000"  >&lt;p&gt;sorry for no logs..&lt;/p&gt;

&lt;p&gt;i will add server loging to my mongos and mongod instances, maybe they will give some useful information... could take a week.. these errors dont appear often..&#160;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="199719" name="mongos.log" size="164528" author="nelson.kingsley@gmx.at" created="Fri, 26 Oct 2018 23:29:36 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 26 Oct 2018 18:30:21 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 14 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>daniel.hatcher@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 14 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>daniel.hatcher@mongodb.com</customfieldvalue>
            <customfieldvalue>nelson.kingsley@gmx.at</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hub94n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hu1j7b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;i cant imagine. its a very big project.&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huavdz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>