使用 Pycharm 调试器时出现超时错误

Timeout error when using Pycharm Debugger

我的 Pyramid 网络应用程序的 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

如果您使用的是 gunicorn(WORKER TIMEOUT 对我来说看起来像 gunicorn)尝试在您的 ini 文件中设置超时(无论您将 PyCharm 指向哪个配置文件):

[server:gunicorn]
use = egg:gunicorn#main
host = 0.0.0.0
port = 1234
workers = 4
timeout = 9999