Hello, We just switched over from using socket.io and tornadio2 to using sockjs-tornado. Thanks for the recommendation btw. There are lots of performance improvements.
We've been running it through our integration for a few days now and are seeing these in our logs. They look very similar to the things we were seeing in socket.io. These are four separate tracebacks from two incidents. They only happen when we use WSS. We are seeing about 10 such incidents during a five hour integration run. Any ideas?
2012-05-15 00:59:18,052 WARNING:Write error on 191: [Errno 14] Bad address
2012-05-15 00:59:18,054 ERROR:Error in periodic callback
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/periodic.py", line 68, in _run
next_call = self.callback()
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/session.py", line 396, in _heartbeat
self.handler.send_pack(proto.HEARTBEAT)
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/transports/websocket.py", line 83, in send_pack
self.write_message(message)
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 169, in write_message
self.ws_connection.write_message(message, binary=binary)
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 577, in write_message
self._write_frame(True, opcode, message)
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 567, in _write_frame
self.stream.write(frame)
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 219, in write
self._handle_write()
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 647, in _handle_write
super(SSLIOStream, self)._handle_write()
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 518, in _handle_write
self.socket.fileno(), e)
AttributeError: 'NoneType' object has no attribute 'fileno'
2012-05-15 00:59:18,223 ERROR:Uncaught exception, closing connection.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 304, in wrapper
callback(*args)
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 661, in _on_frame_data
self._receive_frame()
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 580, in _receive_frame
self.stream.read_bytes(2, self._on_frame_start)
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 180, in read_bytes
self._check_closed()
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 535, in _check_closed
raise IOError("Stream is closed")
IOError: Stream is closed
2012-05-15 00:59:18,224 ERROR:Exception in callback <tornado.stack_context._StackContextWrapper object at 0xfc9f70>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/ioloop.py", line 399, in _run_callback
callback()
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 304, in wrapper
callback(*args)
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 661, in _on_frame_data
self._receive_frame()
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 580, in _receive_frame
self.stream.read_bytes(2, self._on_frame_start)
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 180, in read_bytes
self._check_closed()
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 535, in _check_closed
raise IOError("Stream is closed")
IOError: Stream is closed
Second incident
2012-05-15 01:03:53,559 WARNING:Write error on 3: [Errno 32] Broken pipe
2012-05-15 01:03:53,560 ERROR:Uncaught exception in /sj/333/sjodg8q4/websocket
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 297, in wrapper
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/transports/websocket.py", line 29, in open
self.stream.socket.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1)
AttributeError: 'NoneType' object has no attribute 'setsockopt'
2012-05-15 01:03:53,561 ERROR:Uncaught exception, closing connection.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 304, in wrapper
callback(*args)
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/httpserver.py", line 250, in _on_headers
self.request_callback(self._request)
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/web.py", line 1362, in __call__
handler._execute(transforms, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 145, in _execute
self.ws_connection.accept_connection()
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 509, in accept_connection
self._accept_connection()
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 551, in _accept_connection
self._receive_frame()
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 580, in _receive_frame
self.stream.read_bytes(2, self._on_frame_start)
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 180, in read_bytes
self._check_closed()
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 535, in _check_closed
raise IOError("Stream is closed")
IOError: Stream is closed
2012-05-15 01:03:53,563 ERROR:Exception in callback <tornado.stack_context._StackContextWrapper object at 0x1e018e8>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/ioloop.py", line 399, in _run_callback
callback()
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 304, in wrapper
callback(*args)
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/httpserver.py", line 250, in _on_headers
self.request_callback(self._request)
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/web.py", line 1362, in __call__
handler._execute(transforms, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 145, in _execute
self.ws_connection.accept_connection()
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 509, in accept_connection
self._accept_connection()
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 551, in _accept_connection
self._receive_frame()
File "/usr/local/lib/python2.7/site-packages/sockjs_tornado-0.0.4-py2.7.egg/sockjs/tornado/websocket.py", line 580, in _receive_frame
self.stream.read_bytes(2, self._on_frame_start)
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 180, in read_bytes
self._check_closed()
File "/usr/local/lib/python2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/iostream.py", line 535, in _check_closed
raise IOError("Stream is closed")
IOError: Stream is closed
2012-05-15 01:03:53,569 DEBUG:Ignoring IOError in safe_finish()