I'm trying to benchmark a simple Tornado Server made using tornado.httpserver and I get the following error, when using apache bench with 1000 or more concurrent connections on a Solaris machine.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/tornado-2.3-py2.7.egg/tornado/iostream.py", line 304, in wrapper
File "/usr/local/lib/python2.7/site-packages/tornado-2.3-py2.7.egg/tornado/httpserver.py", line 227, in _on_headers
LookupError: unknown encoding: latin1
I believe this is due to a race condition that leaves the python codec table in an invalid state. My understanding is that latin1 is included in the python standard library, so it should be present as long as nothing is modifying pythons codec table.
I've looked through the tornado src and it doesn't seem to modify the codecs table, so im wondering if anyone out there knows of other methods or issues that may cause this or a similar problem in a multiprocess python application.
Thanks!!
Link to server code: https://www.dropbox.com/s/xrgj59sv0y5y31n/server_ioloop.py