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

AutoReconnect('[Errno 104] Connection reset by peer',)

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6
    • Component/s: None
    • Environment:
      mongodb(2.6.3),pymongo(2.6),python(2.7)
      linux,nginix,uwsgi,django,mongoengine(0.8.7)
    • Fully Compatible

      Traceback (most recent call last):
      File "/opt/ttwxenv/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
      R = retval = fun(*args, **kwargs)
      File "/opt/ttwxenv/lib/python2.7/site-packages/celery/app/trace.py", line 437, in _protected_call_
      return self.run(*args, **kwargs)
      File "/opt/ttwxenv/ttwx-server/src_2015-07-27_12-28-25/feeds/tasks.py", line 35, in process_new_share_like
      feeds.service.send_like_feed(liked_by, share_id)
      File "/opt/ttwxenv/ttwx-server/src_2015-07-27_12-28-25/feeds/service.py", line 48, in send_like_feed
      like = _get_like_info(sender_id, share_id)
      File "/opt/ttwxenv/ttwx-server/src_2015-07-27_12-28-25/feeds/service.py", line 846, in _get_like_info
      like = likes.service.get_share_like(share_id, sender_id)
      File "/opt/ttwxenv/ttwx-server/src_2015-07-27_12-28-25/likes/service.py", line 308, in get_share_like
      like = ShareLike.objects(share_id=share_id, liked_by=liked_by).first()
      File "/opt/ttwxenv/lib/python2.7/site-packages/mongoengine/queryset/base.py", line 256, in first
      result = queryset[0]
      File "/opt/ttwxenv/lib/python2.7/site-packages/mongoengine/queryset/base.py", line 150, in _getitem_
      return queryset._document._from_son(queryset._cursor[key],
      File "/opt/ttwxenv/lib/python2.7/site-packages/pymongo/cursor.py", line 595, in _getitem_
      for doc in clone:
      File "/opt/ttwxenv/lib/python2.7/site-packages/pymongo/cursor.py", line 1058, in next
      if len(self.__data) or self._refresh():
      File "/opt/ttwxenv/lib/python2.7/site-packages/pymongo/cursor.py", line 1002, in _refresh
      self.__uuid_subtype))
      File "/opt/ttwxenv/lib/python2.7/site-packages/pymongo/cursor.py", line 915, in __send_message
      res = client._send_message_with_response(message, **kwargs)
      File "/opt/ttwxenv/lib/python2.7/site-packages/pymongo/mongo_client.py", line 1210, in _send_message_with_response
      raise AutoReconnect(str(e))
      AutoReconnect: [Errno 104] Connection reset by peer

      my mongodb use Replica Set and mongs,have 1 master server and 3 slave server.
      my task run in celery,it will occur errors as described on top.how to resolve this problem?

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            wukan wukan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: