Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-580

Semaphore leak during connection failure.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.3
    • Affects Version/s: 2.6
    • Component/s: None
    • Labels:
      None

      _socket_semaphore.acquire() is called in Pool.get_socket() before we attempt to pop a socket from the set of sockets or create a new socket. Unfortunately, if __check fails and/or we can't create a new socket we don't call _socket_semaphore.release(). This causes all application threads to hang once the semaphore's value reaches 0.

      https://groups.google.com/forum/#!topic/mongodb-user/l0PY8zsjZ3c

        1. pool_fix.diff
          0.7 kB
        2. pymongoConnectionSemaphore.py
          1 kB

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

              Created:
              Updated:
              Resolved: