You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are implementing asynchronous signal handlers using the signal module, you may not be able to use logging from within such handlers. This is because lock implementations in the threading module are not always re-entrant, and so cannot be invoked from such signal handlers.
I'd still rank "doing IO" even in a python signal handler (which is effectively possible to be executed between any given bytecode and between some operations using the C API that check the internal signal context) as a bad idea.
What the consequences of the above remarks are... may depend on how many signals you send.
The text was updated successfully, but these errors were encountered:
the uvicorn socket error on exit is non-critical, however it can cause a cascade effect: uvicorn error -> non-zero exit code -> logging call -> Runtime Error
if you use SIGHUP to reload workers, the almost simultaneous restart of workers cause a lot of these errors and in some situations can cause the the master process to get stuck
In the arbiter's signal-handling code, there are many uses of logging. E.g.
https://github.com/benoitc/gunicorn/blob/master/gunicorn/arbiter.py#L252
however, the docs say this:
https://docs.python.org/3/library/logging.html#thread-safety
elsewhere Gregory Smith says the following:
What the consequences of the above remarks are... may depend on how many signals you send.
The text was updated successfully, but these errors were encountered: