2

我正在使用Flask-KVSession(版本 0.6.2)。它做它必须做的事情。但是当对 webserver 有连续的请求时,会像洪水一样重复以下异常。

2016-06-10_05:41:58.97125 2016-06-10 05:41:58 [29567] [ERROR] Error handling request
2016-06-10_05:41:58.97127 Traceback (most recent call last):
2016-06-10_05:41:58.97128   File "/usr/lib/pymodules/python2.7/gunicorn/workers/async.py", line 45, in handle
2016-06-10_05:41:58.97128     self.handle_request(listener, req, client, addr)
2016-06-10_05:41:58.97129   File "/usr/lib/pymodules/python2.7/gunicorn/workers/ggevent.py", line 151, in handle_request
2016-06-10_05:41:58.97129     super(GeventWorker, self).handle_request(*args)
2016-06-10_05:41:58.97129   File "/usr/lib/pymodules/python2.7/gunicorn/workers/async.py", line 93, in handle_request
2016-06-10_05:41:58.97130     respiter = self.wsgi(environ, resp.start_response)
2016-06-10_05:41:58.97130   File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__
2016-06-10_05:41:58.97140     return self.wsgi_app(environ, start_response)
2016-06-10_05:41:58.97141   File "<flask_app_deploy_file.py>", line 18, in __call__
2016-06-10_05:41:58.97142   File "/usr/lib/python2.7/dist-packages/werkzeug/contrib/fixers.py", line 144, in __call__
2016-06-10_05:41:58.97142     return self.app(environ, start_response)
2016-06-10_05:41:58.97142   File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1813, in wsgi_app
2016-06-10_05:41:58.97143     ctx.push()
2016-06-10_05:41:58.97143   File "/usr/lib/python2.7/dist-packages/flask/ctx.py", line 321, in push
2016-06-10_05:41:58.97152     self.session = self.app.open_session(self.request)
2016-06-10_05:41:58.97161   File "/usr/lib/python2.7/dist-packages/flask/app.py", line 825, in open_session
2016-06-10_05:41:58.97162     return self.session_interface.open_session(self, request)
2016-06-10_05:41:58.97162   File "/usr/lib/pymodules/python2.7/flask_kvsession/__init__.py", line 159, in open_session
2016-06-10_05:41:58.97163     current_app.kvsession_store.get(sid_s)
2016-06-10_05:41:58.97163 EOFError
2016-06-10_05:41:58.97187 ERROR: Error handling request

EOFError的原因可能是什么?我尝试查看flask_kvsession的源代码,无法找出确切的问题。如何减轻 EOFError 的影响?请帮帮我。

4

0 回答 0