【发布时间】:2020-11-23 09:01:17
【问题描述】:
我使用 Gunicorn(使用 Heroku)和 Sentry 为 Django 应用程序提供监控服务。我经常在 Sentry 上收到 2 种不同类型的超时错误:
-
SystemExit 1在gunicorn/workers/base.py在handle_abort在第 201 行 -
WORKER TIMEOUT (pid:12345)Gunicorn 级别
对于第二个,它在 Heroku 中产生 H13 错误 according to the docs means:
当您的网络测功机中的进程接受连接但随后关闭套接字而不向其写入任何内容时,将引发此错误。 可能发生这种情况的一个示例是 Unicorn web server 配置的超时时间短于 30 秒,并且在超时发生之前工作人员尚未处理请求。在这种情况下,Unicorn 在写入任何数据之前关闭连接,从而导致 H13。
这很清楚。
但是对于System Exit 1,我读到这是similar ticket 的超时,但我不确定到底有什么区别。
【问题讨论】:
标签: django heroku timeout gunicorn sentry