Reputation: 3441
I don't see an option among the (MongoClientOptions) to set a timeout for idle connections from the application to MongoDB. We see that connections opened to the mongodb remain open for hours. How this handled in mongodb, is there any options to set idle connection timeout in mongo? http://api.mongodb.org/java/2.10.1/ (MongoClientOptions)
Upvotes: 1
Views: 18706
Reputation: 3441
MongoDB supports the idletimeout, but not all the drives are supported at this point. http://docs.mongodb.org/manual/reference/connection-string/#maxIdleTimeMS
Made this feature request :- https://jira.mongodb.org/browse/JAVA-710
Upvotes: 3