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

Socket leak on exhaust query failure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.6
    • 2.7.2
    • None
    • None
    • Fully Compatible

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: