Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major - P3
-
None
-
2.8.0, 2.9.1
-
None
-
Oracle JVM, Linux 64bit
Description
Hi,
I have an application under high load connected to a MongoDB (2.0.7) using the Java Driver. When the DB fails to allocate memory (mmap), the connection on the client side is reset. The SocketException thrown is causing a cleanup of the entire pool of socket connections in the DBPortPool implementation. Is there a reason for that?
A cleanup of the entire pool leads to OutOfMemoryErrors since connection (de)allocation is expensive. A failure of a single DB operation can affect an entire client application.
Would it not be better to clean up just the connection that was reset?
Thanks