[JAVA-1870] Waiting for 30000 ms before timing out Created: 23/Jun/15 Updated: 04/Aug/20 Resolved: 23/Jun/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API |
| Affects Version/s: | 3.1.0 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Jinho Choi | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | driver, timeout | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
mongodb 3.0.3, jdk 1.6, Centos 3, |
||
| Description |
|
There is an timeout message to update a document on my mongodb. Here is log message :
Below is java code:
|
| Comments |
| Comment by Ross Lawley [ 23/Jun/15 ] |
|
Hi arsis It's the log message you get when the driver isn't able to select a server to speak to. Waiting for 30000 ms before timing out is because of the ServerSelectorTimeout:
The default is 30,000ms and if it can't connect to the server after that time it will then throw an exception. This can be configured via MongoClientOption.Builder. As you are running a single server, the questions to ask are was the MongoDB server up and running and can it be connected to from where the code is being run? Just to let you know this project is for Java driver bugs or feature requests. The best place for questions regarding MongoDB usage or the Java driver specifics is the mongodb-user mailing list or stackoverflow as you will reach a boarder audience there. If your business requires an answer from MongoDB within a set time frame then we do offer production support. As the server selection message is the expected behaviour of the driver, I'm closing this as works as designed. If you do post to the mailing list or stackoverflow please post a link on this ticket and I will endeavour to follow up there. All the best, Ross |