I was able to get some more logs. I wonder if this is being caused by
the logging module? It looks like the traceback happens once, and then
stacks up twice and happens, then 3 times, on and on.
Here is a snippet from my on_close() that I believe starts this:
# self._client_sub is a class that is holding my ZMQStream 'stream'
<code>
if self._client_sub and self._client_sub.stream:
try:
self._client_sub.stream.stop_on_recv()
self._client_sub.stream.stop_on_err()
except Exception, e:
logging.error("Failed to close stream and sub
socket on client disconnect", exc_info=True)
</code>
And here is the start of the traceback:
<code>
[E 110425 20:52:50 messgr:202] Failed to close stream and sub socket
on client disconnect
Traceback (most recent call last):
File "messgr.py", line 198, in on_close
try:
AttributeError: 'NoneType' object has no attribute 'stream'
Traceback (most recent call last):
File "/usr/lib/python2.6/logging/__init__.py", line 776, in emit
msg = self.format(record)
File "/usr/lib/python2.6/logging/__init__.py", line 654, in format
return fmt.format(record)
File "/usr/local/lib/python2.6/dist-packages/tornado-1.2.1-py2.6.egg/
tornado/options.py", line 362, in format
record.exc_text = self.formatException(record.exc_info)
File "/usr/lib/python2.6/logging/__init__.py", line 416, in
formatException
traceback.print_exception(ei[0], ei[1], ei[2], None, sio)
File "/usr/lib/python2.6/traceback.py", line 125, in print_exception
print_tb(tb, limit, file)
File "/usr/lib/python2.6/traceback.py", line 69, in print_tb
line = linecache.getline(filename, lineno, f.f_globals)
File "/usr/lib/python2.6/linecache.py", line 14, in getline
lines = getlines(filename, module_globals)
File "/usr/lib/python2.6/linecache.py", line 40, in getlines
return updatecache(filename, module_globals)
RuntimeError: maximum recursion depth exceeded
Traceback (most recent call last):
Exception RuntimeError: 'maximum recursion depth exceeded while
calling a Python object' in <type 'exceptions.AttributeError'> ignored
[E 110425 20:57:04 websocket:168] Uncaught exception in /realtime/
websocket
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/tornado-1.2.1-
py2.6.egg/tornado/websocket.py", line 165, in wrapper
return callback(*args, **kwargs)
File "build/bdist.linux-x86_64/egg/tornadio/persistent.py", line
80, in on_message
self.async_callback(self.connection.raw_message)(message)
File "/usr/local/lib/python2.6/dist-packages/tornado-1.2.1-
py2.6.egg/tornado/websocket.py", line 169, in wrapper
self._abort()
File "/usr/local/lib/python2.6/dist-packages/tornado-1.2.1-
py2.6.egg/tornado/websocket.py", line 175, in _abort
self.stream.close()
File "/usr/local/lib/python2.6/dist-packages/tornado-1.2.1-
py2.6.egg/tornado/iostream.py", line 180, in close
self._run_callback(self._close_callback)
File "/usr/local/lib/python2.6/dist-packages/tornado-1.2.1-
py2.6.egg/tornado/iostream.py", line 233, in _run_callback
exc_info=True)
File "/usr/lib/python2.6/logging/__init__.py", line 1456, in
error
root.error(*((msg,)+args), **kwargs)
File "/usr/lib/python2.6/logging/__init__.py", line 1082, in
error
self._log(ERROR, msg, args, **kwargs)
File "/usr/lib/python2.6/logging/__init__.py", line 1173, in
_log
self.handle(record)
File "/usr/lib/python2.6/logging/__init__.py", line 1183, in
handle
self.callHandlers(record)
File "/usr/lib/python2.6/logging/__init__.py", line 1220, in
callHandlers
hdlr.handle(record)
File "/usr/lib/python2.6/logging/__init__.py", line 679, in
handle
self.emit(record)
File "/usr/lib/python2.6/logging/__init__.py", line 804, in emit
self.handleError(record)
File "/usr/lib/python2.6/logging/__init__.py", line 733, in
handleError
traceback.print_exception(ei[0], ei[1], ei[2], None,
sys.stderr)
File "/usr/lib/python2.6/traceback.py", line 125, in
print_exception
print_tb(tb, limit, file)
File "/usr/lib/python2.6/traceback.py", line 57, in print_tb
if hasattr(sys, 'tracebacklimit'):
AttributeError: 'module' object has no attribute 'tracebacklimit'
# ... and repeat this again, 3 times...and then 4 times....
</code>