Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-644

SocketException causes cleanup of the entire DBPortPool leading to OutOfMemoryErrors in high load applications

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major - P3 Major - P3
    • None
    • 2.8.0, 2.9.1
    • Connection Management
    • 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            robertgacki Robert Gacki
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: