Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-57

Socket-counter leak

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 0.4, 0.3.4
    • Affects Version/s: 0.3.3
    • Component/s: None
    • None

      MotorPool.get_socket() proactively checks a socket for errors if it hasn't been used in more than a second. It calls select() on the socket's file descriptor to see if socket has been shutdown at the OS level.

      If this check fails, MotorPool fails to decrement its socket counter, so the closed socket is forever counted against max_pool_size.

      This is the equivalent of a semaphore leak in a normal multi-threaded connection pool.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: