spoof / tornado-templates-benchmark

Benchmark of template engines for Tornado

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tornado handlers error

sashka opened this issue · comments

% ./wrk -t10 -c10 -r10000 http://127.0.0.1:8888/tornado/

ERROR:root:Uncaught exception GET /tornado/ (127.0.0.1)
HTTPRequest(protocol='http', host='127.0.0.1:8888', method='GET', uri='/tornado/', version='HTTP/1.1', remote_ip='127.0.0.1', body='', headers={'Host': '127.0.0.1:8888'})
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/tornado/web.py", line 1042, in _execute
    getattr(self, self.request.method.lower())(*args, **kwargs)
  File "server.py", line 82, in get
    self.render("index.html", **context)
  File "/Library/Python/2.7/site-packages/tornado/web.py", line 582, in render
    self.finish(html)
  File "/Library/Python/2.7/site-packages/tornado/web.py", line 722, in finish
    self.request.finish()
  File "/Library/Python/2.7/site-packages/tornado/httpserver.py", line 422, in finish
    self.connection.finish()
  File "/Library/Python/2.7/site-packages/tornado/httpserver.py", line 193, in finish
    self._finish_request()
  File "/Library/Python/2.7/site-packages/tornado/httpserver.py", line 229, in _finish_request
    self.stream.read_until(b("\r\n\r\n"), self._header_callback)
  File "/Library/Python/2.7/site-packages/tornado/iostream.py", line 153, in read_until
    self._try_inline_read()
  File "/Library/Python/2.7/site-packages/tornado/iostream.py", line 388, in _try_inline_read
    self._check_closed()
  File "/Library/Python/2.7/site-packages/tornado/iostream.py", line 571, in _check_closed
    raise IOError("Stream is closed")
IOError: Stream is closed
ERROR:root:Cannot send error response after headers written
ERROR:root:Uncaught exception, closing connection.
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/tornado/iostream.py", line 311, in wrapper
    callback(*args)
  File "/Library/Python/2.7/site-packages/tornado/httpserver.py", line 268, in _on_headers
    self.request_callback(self._request)
  File "/Library/Python/2.7/site-packages/tornado/web.py", line 1427, in __call__
    handler._execute(transforms, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/tornado/web.py", line 1046, in _execute
    self._handle_request_exception(e)
  File "/Library/Python/2.7/site-packages/tornado/web.py", line 1086, in _handle_request_exception
    self.send_error(500, exc_info=sys.exc_info())
  File "/Library/Python/2.7/site-packages/tornado/web.py", line 741, in send_error
    self.finish()
  File "/Library/Python/2.7/site-packages/tornado/web.py", line 721, in finish
    self.flush(include_footers=True)
  File "/Library/Python/2.7/site-packages/tornado/web.py", line 681, in flush
    self.request.write(headers + chunk, callback=callback)
  File "/Library/Python/2.7/site-packages/tornado/httpserver.py", line 418, in write
    self.connection.write(chunk, callback=callback)
  File "/Library/Python/2.7/site-packages/tornado/httpserver.py", line 183, in write
    assert self._request, "Request closed"
AssertionError: Request closed
ERROR:root:Exception in callback <tornado.stack_context._StackContextWrapper object at 0x10bf32940>