gmr / rabbitpy

A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library
http://rabbitpy.readthedocs.org
BSD 3-Clause "New" or "Revised" License
243 stars 58 forks source link

Consumer stop consuming #76

Closed joaquinquintas closed 8 years ago

joaquinquintas commented 9 years ago

I have 5 consumers, and some of then stop consuming suddenly. I do not know what is causing this, no error messages. Please help

gmr commented 9 years ago

rabbitpy is instrumented with Python's standard logger. To get started, enable logging in your app and let me know what you see:

import logging

logging.basicConfig(level=logging.INFO)
joaquinquintas commented 9 years ago

sometimes I get this:

ERROR:rabbitpy.channel0:Have not received a heartbeat in 900 seconds Exception in thread 0x7f64f5816050-io: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/local/lib/python2.7/dist-packages/rabbitpy/io.py", line 348, in run self._loop.run() File "/usr/local/lib/python2.7/dist-packages/rabbitpy/io.py", line 190, in run self._poll() File "/usr/local/lib/python2.7/dist-packages/rabbitpy/io.py", line 235, in _poll self._read() File "/usr/local/lib/python2.7/dist-packages/rabbitpy/io.py", line 249, in _read self._data.read_callback(self._data.fd.recv(MAX_READ)) File "/usr/local/lib/python2.7/dist-packages/rabbitpy/io.py", line 386, in on_read self._channels[0][0].on_frame(value[1]) File "/usr/local/lib/python2.7/dist-packages/rabbitpy/channel0.py", line 114, in on_frame self.write_frame(heartbeat.Heartbeat()) File "/usr/local/lib/python2.7/dist-packages/rabbitpy/base.py", line 235, in write_frame self._check_for_exceptions() File "/usr/local/lib/python2.7/dist-packages/rabbitpy/base.py", line 289, in _check_for_exceptions raise exception ConnectionResetException: Connection was reset at socket level

gmr commented 9 years ago

There's one problem. What version are you using?

Edit: Looks like I've not released an update that cleans up heartbeat behavior. You might want to test against Github master and see if that resolved your issue.

joaquinquintas commented 9 years ago

import rabbitpy rabbitpy.version '0.26.2'

joaquinquintas commented 9 years ago

After installation:

python setup.py install

I get this message:

Installed /usr/local/lib/python2.7/dist-packages/rabbitpy-0.26.2-py2.7.egg Processing dependencies for rabbitpy==0.26.2 Searching for pamqp==1.6.1 Best match: pamqp 1.6.1 Adding pamqp 1.6.1 to easy-install.pth file

Using /usr/local/lib/python2.7/dist-packages Finished processing dependencies for rabbitpy==0.26.2 root@live:~/soft/rabbitpy# python Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import rabbitpy rabbitpy.version '0.26.2'

This is the same version. Am I missing something? Thanks

turdakov commented 9 years ago

I have same problem. UPD: in Github master everything works. (don't forget delete previous installation of rabbitpy before running setup.py install)

andynemzek commented 8 years ago

Same problem here. Did anyone ever figure this out? Any workarounds besides using an unreleased version of the code? When will this be released? There's a handful of issues reporting this behavior...all are pretty old...

gmr commented 8 years ago

This is related to hearbeats, and is addressed in the impending 0.27