mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Log a warning when a worker was terminated due to a signal
This happens for example when being OOM killed. See #2215
This commit is contained in:
parent
548d5828da
commit
b695b497b9
@ -526,6 +526,12 @@ class Arbiter(object):
|
|||||||
if exitcode == self.APP_LOAD_ERROR:
|
if exitcode == self.APP_LOAD_ERROR:
|
||||||
reason = "App failed to load."
|
reason = "App failed to load."
|
||||||
raise HaltServer(reason, self.APP_LOAD_ERROR)
|
raise HaltServer(reason, self.APP_LOAD_ERROR)
|
||||||
|
if os.WIFSIGNALED(status):
|
||||||
|
self.log.warning(
|
||||||
|
"Worker with pid %s was terminated due to signal %s",
|
||||||
|
wpid,
|
||||||
|
os.WTERMSIG(status)
|
||||||
|
)
|
||||||
|
|
||||||
worker = self.WORKERS.pop(wpid, None)
|
worker = self.WORKERS.pop(wpid, None)
|
||||||
if not worker:
|
if not worker:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user