From f4842a5ab8c75e624451adb998518a4d5a32b181 Mon Sep 17 00:00:00 2001 From: Jan-Philip Gehrcke Date: Wed, 4 May 2016 19:46:32 +0200 Subject: [PATCH] Log exception occurring during worker exit --- THANKS | 3 ++- gunicorn/arbiter.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/THANKS b/THANKS index e147d9b1..49cff951 100644 --- a/THANKS +++ b/THANKS @@ -160,4 +160,5 @@ Hebert J Kevin Littlejohn Wolfgang Schnerring Jason Madden -Eugene Obukhov \ No newline at end of file +Eugene Obukhov +Jan-Philip Gehrcke diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index fe96ac00..3e1f772d 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -11,6 +11,7 @@ import select import signal import sys import time +import traceback from gunicorn.errors import HaltServer, AppImportError from gunicorn.pidfile import Pidfile @@ -535,7 +536,8 @@ class Arbiter(object): worker.tmp.close() self.cfg.worker_exit(self, worker) except: - pass + self.log.warning("Exception during worker exit:\n%s", + traceback.format_exc()) def spawn_workers(self): """\