[JAVA-721] Read Time out intermittently while reading Created: 28/Dec/12 Updated: 05/Jan/13 Resolved: 05/Jan/13 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | 2.9.3, 2.10.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Guneet Sahai | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | connections, timeout | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 12.10 |
||
| Description |
|
I have a simple web application running in Apache Tomcat that is attempting to read a document from mongo on some user action. While this generally works, it occasionally throws a Read timeout Exception (full stack trace at the end). I've observed that this usually happens when there is no activity on the server for some time - but I unable to ascertain the duration of inactivity. I also know that this is not a connectivity issue - I wrote a small application that does a read every second. This app continues to run during the time when my web app complains about timeout. Another interesting observation is that this problem does not occur for clients on the same machine as mongo server. I've done some reading & figured that reducing keep alive time interval might help but I'm not sure on that. Is there a recommended setting for keep alive time interval? My configuration parameters are as following mongoOptions.connectTimeout=5000 Additional Settings Stack Trace |
| Comments |
| Comment by Guneet Sahai [ 05/Jan/13 ] |
|
The problem seems to have been solved for me. Here's the resolution: Additional Information - On one of the environments, I have monogo server running on version 2.2.x. This problem does not occur there with the same driver version. On my testing environment where the mongo server version is 2.0.3 - I tried reducing the keepalive time to 5 mins (as advised at http://docs.mongodb.org/manual/faq/diagnostics/ from 2 hours) on the client machine (running on linux) & that helped. I haven't seen the problem re-occur for last couple of days. Can close the issue (I couldn't find a way to do this myself). |