Unreliable connection causes KeyError exception

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.6.1
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In pymongo 3.6.1 its possible to get this exception:

      Traceback (most recent call last):
        File "/opt/venvs/mongo_source/lib/python3.5/site-packages/pymongo/pool.py", line 952, in _get_socket_no_auth
          sock_info = self.sockets.pop()
      KeyError: 'pop from an empty set'
      

      I can replicate this easily by running inside of an environment with large packet loss and a client set with a short timeout: `pymongo.MongoClient('mongo', j=True, socketTimeoutMS=10)`

            Assignee:
            Shane Harvey (Inactive)
            Reporter:
            Job Evers-Meltzer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: