Semaphore leak during connection failure.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.6.3
    • Affects Version/s: 2.6
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              A. Jesse Jiryu Davis
              Reporter:
              Bernie Hackett
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: