earl / beanstalkc

A simple beanstalkd client library for Python
Apache License 2.0
458 stars 115 forks source link

reserve() throwing errors #16

Closed adsahay closed 12 years ago

adsahay commented 12 years ago

I'm getting a strange stack trace when trying to reserve a job.

File "applications/init/modules/metadata_worker.py", line 31, in <module> job = bs.reserve(timeout=TIMEOUT) File "/usr/local/lib/python2.6/dist-packages/beanstalkc.py", line 131, in reserve ['DEADLINE_SOON', 'TIMED_OUT']) File "/usr/local/lib/python2.6/dist-packages/beanstalkc.py", line 98, in _interact_job jid, size = self._interact(command, expected_ok, expected_err) File "/usr/local/lib/python2.6/dist-packages/beanstalkc.py", line 72, in _interact status, results = self._read_response() File "/usr/local/lib/python2.6/dist-packages/beanstalkc.py", line 81, in _read_response line = SocketError.wrap(self._socket_file.readline) File "/usr/local/lib/python2.6/dist-packages/beanstalkc.py", line 41, in wrap return fn(*args, **kwargs) File "/usr/lib/python2.6/socket.py", line 406, in readline data = self._sock.recv(self._rbufsize)

I don't know what to make of it, as the error name and description are nowhere. Strange thing is, when I run python in the shell (same python as the one running my script above), the reserve thing works intermittently fine. Sometimes even bs.reserve(timeout=0) hangs. Any clues on how to debug this issue?

adsahay commented 12 years ago

Sorry, I wish to close this now. It has started working properly now, and it will be hard to find and fix intermittent issues.