我的金字塔Web应用程序的Pycharm调试器配置运行良好,但是当我在断点处长时间停留时会出现超时错误。我怎样才能避免得到这个(下面的追溯),并保持调试平稳?
[2016-05-02 10:13:39 +0000] [5203] [CRITICAL] WORKER TIMEOUT (pid:5218)
Traceback (most recent call last):
File "/home/vagrant/.pycharm_helpers/pydev/_pydevd_bundle/pydevd_frame.py", line 490, in trace_dispatch
self.do_wait_suspend(thread, frame, event, arg)
File "/home/vagrant/.pycharm_helpers/pydev/_pydevd_bundle/pydevd_frame.py", line 67, in do_wait_suspend
self._args[0].do_wait_suspend(*args, **kwargs)
File "/home/vagrant/.pycharm_helpers/pydev/pydevd.py", line 712, in do_wait_suspend
time.sleep(0.01)
File "/home/vagrant/venv/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 159, in handle_abort
sys.exit(1)
SystemExit: 1
Error - <type 'exceptions.SystemExit'>: 1
[2016-05-02 10:13:39 +0000] [5218] [INFO] Worker exiting (pid: 5218)
Exiting 0 (-v to see traceback)
^C[2016-05-02 10:13:40 +0000] [5203] [INFO] Handling signal: int
Traceback (most recent call last):
File "/home/vagrant/.pycharm_helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 336, in _on_run
r = self.sock.recv(1024)
error: [Errno 4] Interrupted system call
答案 0 :(得分:2)
如果您正在使用gunicorn(WORKER TIMEOUT对我来说就像是枪炮),请尝试在您的ini文件中设置超时(无论您将PyCharm指向哪个配置文件):
[server:gunicorn]
use = egg:gunicorn#main
host = 0.0.0.0
port = 1234
workers = 4
timeout = 9999