[JAVA-553] Change default timeout values in MongoOptions Created: 16/Apr/12  Updated: 29/Aug/12  Resolved: 02/Jul/12

Status: Closed
Project: Java Driver
Component/s: Configuration
Affects Version/s: None
Fix Version/s: 2.9.0

Type: Improvement Priority: Minor - P4
Reporter: Jérôme LELEU Assignee: Steve Briskin (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Discussion on what default values for which timeouts should be setted is available here :
http://groups.google.com/group/mongodb-dev/browse_thread/thread/6cf754a5ca724d9b?hl=fr



 Comments   
Comment by Jeffrey Yemin [ 29/Aug/12 ]

Closing as part of 2.9.0 release process.

Comment by auto [ 10/Jul/12 ]

Author:

{u'date': u'2012-06-12T12:03:17-07:00', u'name': u'Steve Briskin', u'email': u'steve.briskin@10gen.com'}

Message: JAVA-553 change connection timeout default from unlimited to 10 sec.
Branch: ReadPrefs
https://github.com/mongodb/mongo-java-driver/commit/03c5fd083328d342b535c94ce48948d2c39decce

Comment by auto [ 10/Jul/12 ]

Author:

{u'date': u'2012-06-12T12:03:17-07:00', u'name': u'Steve Briskin', u'email': u'steve.briskin@10gen.com'}

Message: JAVA-553 change connection timeout default from unlimited to 10 sec.
Branch: ReadPrefs
https://github.com/mongodb/mongo-java-driver/commit/be5a807e4ec28261b661877b79ad660eabd85599

Comment by auto [ 25/Jun/12 ]

Author:

{u'date': u'2012-06-12T12:03:17-07:00', u'name': u'Steve Briskin', u'email': u'steve.briskin@10gen.com'}

Message: JAVA-553 change connection timeout default from unlimited to 10 sec.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/03c5fd083328d342b535c94ce48948d2c39decce

Comment by auto [ 25/Jun/12 ]

Author:

{u'date': u'2012-06-12T12:03:17-07:00', u'name': u'Steve Briskin', u'email': u'steve.briskin@10gen.com'}

Message: JAVA-553 change connection timeout default from unlimited to 10 sec.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/be5a807e4ec28261b661877b79ad660eabd85599

Comment by Jeffrey Yemin [ 17/Apr/12 ]

Copying conversation (eliot is the responder):

> - some default values are IMHO very dangerous :
> * maxWaitTime : it's 120 seconds : I would set it to 200 ms
Most connection pools have no timeout, so I think 120 seconds is a good start.
Obviously it is too high for certain apps, but I do think its a good default.

> * connectTimeout : it's unlimited : I would set it to 200 ms
Agree this shouldn't be unlimited. 200ms is way too aggressive though.
5 or 10 seconds seems appropriate.

> * socketTimeout : it's unlimited : I would set it to 1 second
> * wtimeout : it's unlimited : I would set it to 1 second
For both of these, most people expect no timeout for db operations.

Comment by Jérôme LELEU [ 17/Apr/12 ]

Jeff, you're right: it changes the default behaviour of the driver and unexpected timeouts could happened.
But having no timeout by default makes the driver not ready for production : timeouts are one of the main protection againt system failures.

Comment by Jeffrey Yemin [ 17/Apr/12 ]

Changing default values is not generally considered backwards compatible. Have to think about this one.

Generated at Thu Feb 08 08:52:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.