[JAVA-1827] MongoException$Network: Read operation to server localhost:27017 failed on database ... Created: 21/May/15 Updated: 11/Sep/19 Resolved: 22/May/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | 2.12.3 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Eduardo Mayer | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Grails Framework |
||
| Description |
|
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. The same exact exception took place when we were iterating over the results of another aggregation: DBCursor cursor = db.cMD.find([colaborador: [$in: listP], data: data], [colab: 1, _id: 0]) def listW = [] while (cursor.hasNext()) { <-- (Exception happened here) def resultMap = cursor.next().toMap() listW.add(resultMap.colab) }2015-05-20 14:03:43,511 [quartzScheduler_Worker-6] ERROR listeners.ExceptionPrinterJobListener - Exception occurred in job: Grails Job |
| Comments |
| Comment by Ross Lawley [ 22/May/15 ] |
|
Hi eduardomayer, 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: Caused by: java.net.SocketTimeoutException: Read timed out. You'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'm closing this ticket as "Works as designed", if you disagree then please feel free to comment and I'll review. For future, the best place for questions regarding MongoDB usage or the Java driver specifics is the mongodb-user mailinglist or stackoverflow as you will reach a boarder audience there. If you require support within a timeline please see our production support page. Ross |