earl/beanstalkc — Issue #16: reserve() throwing errors
Author: adsahay
Created: 2011-12-07 06:19:03+00:00
State: open

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

``` File "applications/init/modules/metadata_worker.py", line 31, in
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?