<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:55:36 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-1827] MongoException$Network: Read operation to server localhost:27017 failed on database ...</title>
                <link>https://jira.mongodb.org/browse/JAVA-1827</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;We started getting the below error intermittently during the last week. So far we could not trace this problem to anything in particular. The query in particular is an aggregation to a collection which has around 400k objects. We have the same application running for different clients and it started happening to clients which have passed that 400k mark. I ran the query directly and it took about 1.5 seconds.&lt;/p&gt;

&lt;p&gt;The same exact exception took place when we were iterating over the results of another aggregation:&lt;/p&gt;

&lt;p&gt;DBCursor cursor = db.cMD.find([colaborador: &lt;span class=&quot;error&quot;&gt;&amp;#91;$in: listP&amp;#93;&lt;/span&gt;, data: data], &lt;span class=&quot;error&quot;&gt;&amp;#91;colab: 1, _id: 0&amp;#93;&lt;/span&gt;)&lt;/p&gt;

&lt;p&gt;        def listW = []&lt;/p&gt;

&lt;p&gt;        while (cursor.hasNext()) &lt;/p&gt;
{                 &amp;lt;-- (Exception happened here)
            def resultMap = cursor.next().toMap()
            listW.add(resultMap.colab)
        }



&lt;p&gt;2015-05-20 14:03:43,511 &lt;span class=&quot;error&quot;&gt;&amp;#91;quartzScheduler_Worker-6&amp;#93;&lt;/span&gt; ERROR listeners.ExceptionPrinterJobListener  - Exception occurred in job: Grails Job&lt;br/&gt;
org.quartz.JobExecutionException: com.mongodb.MongoException$Network: Read operation to server localhost:27017 failed on database application1 &lt;span class=&quot;error&quot;&gt;&amp;#91;See nested exception: com.mongodb.MongoException$Network: Read operation to server localhost:27017 failed on database application1&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at grails.plugins.quartz.GrailsJobFactory$GrailsJob.execute(GrailsJobFactory.java:111)&lt;br/&gt;
	at grails.plugins.quartz.QuartzDisplayJob.execute(QuartzDisplayJob.groovy:27)&lt;br/&gt;
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)&lt;br/&gt;
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)&lt;br/&gt;
Caused by: com.mongodb.MongoException$Network: Read operation to server localhost:27017 failed on database application1&lt;br/&gt;
	at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:300)&lt;br/&gt;
	at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:271)&lt;br/&gt;
	at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:84)&lt;br/&gt;
	at com.mongodb.DB.command(DB.java:317)&lt;br/&gt;
	at com.mongodb.DB.command(DB.java:296)&lt;br/&gt;
	at com.mongodb.DBCollectionImpl.aggregate(DBCollectionImpl.java:99)&lt;br/&gt;
	at com.mongodb.DBCollection.aggregate(DBCollection.java:1571)&lt;br/&gt;
	at com.gmongo.internal.Patcher._invoke(Patcher.groovy:49)&lt;br/&gt;
	at com.gmongo.internal.Patcher$__patchInternal_closure1.doCall(Patcher.groovy:38)&lt;br/&gt;
	at &lt;br/&gt;
OUR APPLICATION CODE&lt;br/&gt;
	at GrailsMelodyGrailsPlugin$_closure4_closure16_closure17.doCall(GrailsMelodyGrailsPlugin.groovy:184)&lt;br/&gt;
	at &lt;br/&gt;
OUR APPLICATION CODE&lt;br/&gt;
	at grails.plugins.quartz.GrailsJobFactory$GrailsJob.execute(GrailsJobFactory.java:102)&lt;br/&gt;
	... 3 more&lt;br/&gt;
Caused by: java.net.SocketTimeoutException: Read timed out&lt;br/&gt;
	at java.net.SocketInputStream.read(SocketInputStream.java:152)&lt;br/&gt;
	at java.net.SocketInputStream.read(SocketInputStream.java:122)&lt;br/&gt;
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)&lt;br/&gt;
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)&lt;br/&gt;
	at java.io.BufferedInputStream.read(BufferedInputStream.java:334)&lt;br/&gt;
	at org.bson.io.Bits.readFully(Bits.java:48)&lt;br/&gt;
	at org.bson.io.Bits.readFully(Bits.java:35)&lt;br/&gt;
	at org.bson.io.Bits.readFully(Bits.java:30)&lt;br/&gt;
	at com.mongodb.Response.&amp;lt;init&amp;gt;(Response.java:42)&lt;br/&gt;
	at com.mongodb.DBPort$1.execute(DBPort.java:141)&lt;br/&gt;
	at com.mongodb.DBPort$1.execute(DBPort.java:135)&lt;br/&gt;
	at com.mongodb.DBPort.doOperation(DBPort.java:164)&lt;br/&gt;
	at com.mongodb.DBPort.call(DBPort.java:135)&lt;br/&gt;
	at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:292)&lt;br/&gt;
	... 16 more&lt;/p&gt;</description>
                <environment>Grails Framework</environment>
        <key id="205841">JAVA-1827</key>
            <summary>MongoException$Network: Read operation to server localhost:27017 failed on database ...</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="eduardomayer">Eduardo Mayer</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 May 2015 18:43:11 +0000</created>
                <updated>Wed, 11 Sep 2019 19:10:34 +0000</updated>
                            <resolved>Fri, 22 May 2015 08:08:31 +0000</resolved>
                                    <version>2.12.3</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="921382" author="ross@10gen.com" created="Fri, 22 May 2015 08:08:31 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=eduardomayer&quot; class=&quot;user-hover&quot; rel=&quot;eduardomayer&quot;&gt;eduardomayer&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;This error occurs when there is an exception connecting to the database, when fetching more results from a cursor.  From the stacktrace I can see the root cause was: &lt;tt&gt;Caused by: java.net.SocketTimeoutException: Read timed out&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;You&apos;d have to look at your systems logs for insight into the reasons for the timeout. As this is expected behaviour for the driver I&apos;m closing this ticket as &quot;Works as designed&quot;, if you disagree then please feel free to comment and I&apos;ll review.&lt;/p&gt;

&lt;p&gt;For future, the best place for questions regarding MongoDB usage or the Java driver specifics is the &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongodb-user mailinglist&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;stackoverflow&lt;/a&gt; as you will reach a boarder audience there.  If you require support within a timeline please see our &lt;a href=&quot;https://www.mongodb.com/products/production-support&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;production support&lt;/a&gt; page.&lt;/p&gt;

&lt;p&gt;Ross&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|hs9l6n:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>