-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
ensure we can catch correctly exceptions based on BaseException. Note: patch was origninally proposed by the pr #2923, but original author closed it. Fix #2923
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,7 +154,7 @@ def handle(self, listener, client, addr): | |
self.log.debug("Ignoring socket not connected") | ||
else: | ||
self.log.debug("Ignoring EPIPE") | ||
except Exception as e: | ||
except BaseException as e: | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
fsrajer
|
||
self.handle_error(req, client, addr, e) | ||
finally: | ||
util.close(client) | ||
|
Hello @benoitc . We are happy users of gunicorn and deploy it in scale in our app. I just wanted to mention that this change is catching even the
SystemExit
errors, which are triggered bysys.exit
. Thesesys.exit
are called in methods likehandle_quit
orhandle_abort
, which are typically already logged as "WORKER TIMEOUT". Not sure if this was intended by the change. It is causing us a bit of a hurdle in monitoring, so I just wanted to call it out.