<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:51 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>[JAVA-1121] Socket Read timed out happens frequently</title>
                <link>https://jira.mongodb.org/browse/JAVA-1121</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Even if the socket.setKeepAlive is true, the SocketException Read timed out still happens very frequently ( ~10 times a day.) I lowered the tcp_keepalive_time to 5 minutes but it doesn&apos;t seem to help.&lt;/p&gt;

&lt;p&gt;How do we resolve this? Retry by ourselves? Could the driver retry automatically?&lt;/p&gt;</description>
                <environment>AWS AMI</environment>
        <key id="112713">JAVA-1121</key>
            <summary>Socket Read timed out happens frequently</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="-1">Unassigned</assignee>
                                    <reporter username="Dao007forever">Trong Dao Le [X]</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Feb 2014 06:41:07 +0000</created>
                <updated>Wed, 26 Feb 2014 12:55:22 +0000</updated>
                            <resolved>Wed, 26 Feb 2014 12:55:22 +0000</resolved>
                                    <version>2.11.2</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="505583" author="dao007forever" created="Wed, 26 Feb 2014 12:52:14 +0000"  >&lt;p&gt;Thanks, Jeff. Like I said, the request was received 10 minutes later at the server.&lt;br/&gt;
I&apos;ll close this and ask at the forum then.&lt;/p&gt;</comment>
                            <comment id="504751" author="jeff.yemin" created="Tue, 25 Feb 2014 11:42:27 +0000"  >&lt;p&gt;From what you describe, this does not seem to be a problem with a specific socket, since as you say the response is, eventually, received. It&apos;s more likely a problem either in the network or in the database.   So if you turn up logging in the database (e.g., -vv) when do you see the request being received at the server?&lt;/p&gt;

&lt;p&gt;I should also mention that at this point this does not seem to be a bug in the Java driver, so it would be better to ask this type of question in our user forum (mongodb-user on Google groups).&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="504716" author="dao007forever" created="Tue, 25 Feb 2014 07:58:20 +0000"  >&lt;p&gt;I changed the socket timeout to -1 to check again. You are right, they seems to get through after 10 minutes (!!) What is your suggestion?&lt;/p&gt;

&lt;p&gt;We can&apos;t manually retry, because it will use the same connection, right? Should the driver obtain a new connection from the pool and retry?&lt;/p&gt;</comment>
                            <comment id="504573" author="jeff.yemin" created="Tue, 25 Feb 2014 01:29:06 +0000"  >&lt;p&gt;Do you have a reason to think that a stale connection would cause a read timeout?  In my experience they usually result in an immediate SocketException of some sort.&lt;/p&gt;</comment>
                            <comment id="503866" author="dao007forever" created="Mon, 24 Feb 2014 02:51:44 +0000"  >&lt;p&gt;Hi Jeff,&lt;/p&gt;

&lt;p&gt;My settings are:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;SocketTimeout: 15s&lt;/li&gt;
	&lt;li&gt;KeepAlive: true&lt;/li&gt;
	&lt;li&gt;AutoConnectRetry: true&lt;/li&gt;
	&lt;li&gt;maxAutoConnectRetryTime: 5&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;All the timeout are Read operations. I check the profiler on the Mongo server, the request doesn&apos;t reach the server. It is either a network failure or a stale connection. It seems more probable that it is a stale connection.&lt;/p&gt;</comment>
                            <comment id="502951" author="jeff.yemin" created="Fri, 21 Feb 2014 11:05:51 +0000"  >&lt;p&gt;keep-alive and read timeout are very different.  What MongoClientOptions settings are you using when constructing your MongoClient instance?  &lt;/p&gt;

&lt;p&gt;Another thing to look at is which operations are timing out, and then determine why that&apos;s happening.  &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <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|hrwaq7:</customfieldvalue>

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