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

Socket leak on exhaust query failure

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.2
    • Affects Version/s: 2.6
    • Component/s: None
    • None
    • Fully Compatible

      If the server returns an error when an exhaust cursor makes its initial query, a socket is leaked and the max_pool_size semaphore is never incremented:

      collection.find({'$bad_query_operator': 1}, exhaust=True)
      

      The bug is in both MongoClient and MongoReplicaSetClient.

      A network error on an exhaust cursor's initial query, on the other hand, is handled correctly in MongoReplicaSetClient, but causes a leak in MongoClient.

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

              Created:
              Updated:
              Resolved: