[JAVA-287] set TCP_KEEPALIVE on the java driver Created: 28/Feb/11  Updated: 07/Apr/11  Resolved: 04/Apr/11

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

Type: Improvement Priority: Major - P3
Reporter: Eliot Horowitz (Inactive) Assignee: Antoine Girbal
Resolution: Done Votes: 6
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

or have a reaper that closes connections idle for 30 minutes.



 Comments   
Comment by Antoine Girbal [ 04/Apr/11 ]

couldnt use patch as-is since the class was modified recently.
fix is same as patch, but default value for keepalive is false.

Comment by auto [ 04/Apr/11 ]

Author:

{u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

Message: JAVA-287: set TCP_KEEPALIVE on the java driver
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/cf64e3f91a4eca4eb4685724cc778ffe8600da00

Comment by Timmo Freudl-Gierke [ 04/Apr/11 ]

@Antoine:
Same problem we have as I told you @Mongoberlin. Caused by a firewall between application server (with mongo driver) and mongo database which closes the connection after timeout.
Ugly workaround: http://de.wikipedia.org/wiki/Stateful_Packet_Inspection#Timeout (postpones the problem for max 2h)
Timmo

Comment by Benedikt Waldvogel [ 17/Mar/11 ]

I've made a pull request for that issue: https://github.com/mongodb/mongo-java-driver/pull/25

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