Django Gunicorn 不同类型的超时
Django Gunicorn different type of timeout
我使用 Gunicorn(使用 Heroku)和 Sentry 提供 Django 应用程序进行监控。我经常在 Sentry 上收到 2 种不同类型的超时错误:
SystemExit 1
in gunicorn/workers/base.py
in handle_abort
在第 201 行
WORKER TIMEOUT (pid:12345)
Gunicorn 级别
对于第二个,它在 Heroku 中产生 H13 错误 according to the docs means:
This error is thrown when a process in your web dyno accepts a connection but then closes the socket without writing anything to it.
One example where this might happen is when a Unicorn web server is configured with a timeout shorter than 30s and a request has not been processed by a worker before the timeout happens. In this case, Unicorn closes the connection before any data is written, resulting in an H13.
够清楚了。
但是对于 System Exit 1
,我读到它是 中的超时,但我不确定到底有什么区别。
SystemExit 只是通用的“停止进程”信号,可能是同一个错误被 Sentry 捕获了两次(一次作为异常抛出,一次以 level=error 记录)。
我使用 Gunicorn(使用 Heroku)和 Sentry 提供 Django 应用程序进行监控。我经常在 Sentry 上收到 2 种不同类型的超时错误:
SystemExit 1
ingunicorn/workers/base.py
inhandle_abort
在第 201 行WORKER TIMEOUT (pid:12345)
Gunicorn 级别
对于第二个,它在 Heroku 中产生 H13 错误 according to the docs means:
This error is thrown when a process in your web dyno accepts a connection but then closes the socket without writing anything to it. One example where this might happen is when a Unicorn web server is configured with a timeout shorter than 30s and a request has not been processed by a worker before the timeout happens. In this case, Unicorn closes the connection before any data is written, resulting in an H13.
够清楚了。
但是对于 System Exit 1
,我读到它是
SystemExit 只是通用的“停止进程”信号,可能是同一个错误被 Sentry 捕获了两次(一次作为异常抛出,一次以 level=error 记录)。