gunicorn
gunicorn copied to clipboard
revert: 4023228 ("let's exception not bubble")
The report in https://github.com/benoitc/gunicorn/issues/2923 may have been not caused by a bug in Gunicorn or gevent in the first place. In any case, going from "this particular exception" to "each and every BaseException" was way excessive and is a likely explanation for https://github.com/benoitc/gunicorn/issues/3207
Context:
- https://github.com/benoitc/gunicorn/commit/40232284934c32939c0e4e78caad1987c3773e08#r144628336
Suggested changes:
- revert that patch
- reintroduce a more specific exception catching that mimics what the reverted patch tried to accomplish, while emitting a new warning.
Unfinished thoughts:
- the SSLError from wrap_socket in the eventlet worker (afaict, can only be triggered by the client sending garbage or disconnecting while Gunicorn was overloaded) cannot be dealt with this way due to class inheritance stepping outside the huge try-except block. I have a currently skipped test to reproduce this - the problem is over here: https://github.com/benoitc/gunicorn/blob/903792f152af6a27033d458020923cb2bcb11459/gunicorn/workers/geventlet.py#L153-L156
- WIP: https://github.com/pajod/gunicorn/commit/f63030411982edf390149c8df5f10b8fdeaf8907
- Partially reverts: 40232284934c32939c0e4e78caad1987c3773e08
- Partially reverts: 0b10cbab1d6368fcab2d5a7b6fe359a6cecc81a7
- Fixes: https://github.com/benoitc/gunicorn/issues/3207