From ee1e5c1928c71fa366dfac99c65f630e03aed8b7 Mon Sep 17 00:00:00 2001 From: Randall Leeds Date: Mon, 20 Apr 2020 19:31:53 -0700 Subject: [PATCH] Log abnormal worker exit codes --- gunicorn/arbiter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 532426d2..1bab2c61 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -520,6 +520,8 @@ class Arbiter(object): # that it could not boot, we'll shut it down to avoid # infinite start/stop cycles. exitcode = status >> 8 + if exitcode != 0: + self.log.error('Worker (pid:%s) exited with code %s', wpid, exitcode) if exitcode == self.WORKER_BOOT_ERROR: reason = "Worker failed to boot." raise HaltServer(reason, self.WORKER_BOOT_ERROR)