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

assertion failure on socket disconnect

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.7
    • Affects Version/s: None
    • Component/s: None
    • None

      While trying to diagnose a connectivity problem with a customer server, I had a pymongo client connected to one of our servers with ssl=True and use_greenlets=True, just sitting with the idle connection open, logging the date/time and the return value from connection.alive() once a minute. After about 9 days there was a disconnect but I think that may have been caused by us on the server side. The client side result was an assertion failure:

      Traceback (most recent call last):
      File "test.py", line 11, in <module>
      print (time.ctime(), c2.alive())
      File "/usr/local/lib/python2.7/dist-packages/pymongo-2.6_-py2.7-linux-x86_64.egg/pymongo/mongo_client.py", line 852, in alive
      self.__pool.maybe_return_socket(sock_info)
      File "/usr/local/lib/python2.7/dist-packages/pymongo-2.6_-py2.7-linux-x86_64.egg/pymongo/pool.py", line 397, in maybe_return_socket
      assert sock_info not in (NO_REQUEST, NO_SOCKET_YET)
      AssertionError

      I can try to reproduce this if you want, by pointing the client at a test server and then stopping the server, but I thought maybe the above is enough to be useful.

      Output of pymongo.version is "2.6+" but I'm not certain of the exact build.

      Paul

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            mhqpaul Paul Rubin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: