Merge pull request #2475 from m2p-consulting/log-killed

Log a warning when a worker was terminated due to a signal
This commit is contained in:
Benoit Chesneau 2020-12-17 11:29:04 +01:00 committed by GitHub
commit 7ca05ec4e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -526,6 +526,12 @@ class Arbiter(object):
if exitcode == self.APP_LOAD_ERROR:
reason = "App failed to load."
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)
if not worker: