BTW, you can see example of stack trace generated when request-timeout occurs in recent mailing list discussion at:
https://groups.google.com/d/msg/modwsgi/_i6MGs6fh6w/nH3x7_nuAwAJ <https://groups.google.com/d/msg/modwsgi/_i6MGs6fh6w/nH3x7_nuAwAJ> Graham > On 7 Feb 2018, at 1:55 pm, Graham Dumpleton <graham.dumple...@gmail.com> > wrote: > > > >> On 7 Feb 2018, at 1:52 pm, Jesus Cea <j...@jcea.es> wrote: >> >> I find annoying that mod_wsgi doesn't log when it decides to restart a >> daemon process because it becomes unresponsive. It could be useful even >> log it when the maximum request number is reached (if defined) and the >> daemon is recycled. > > On this specific issue, it will logs lots of stuff if you have Apache log > level set to info. > > LogLevel info > > For request-timeout expiring it even logs stack traces for you if it can so > you can see where it gets stuck. > > It is too noisy if logged at warn/err and not appropriate either. > > I will look at the other issues you raised later. > >> Beside that, it could be really useful mod_wsgi call "faulthandler" when >> is about to reboot the daemon. This module was introduced in Python 3.3 >> and it is invaluable in deadlock situations, just the situation when >> mod_wsgi decides to restart a daemon because it is unresponsible. >> >> Patch seems quite easy: Instead of killing the process as is, send first >> a signal to request "faulthandler" dump, and then do the killing. >> >> An "atexit()" handler could be not enough if python interpreter is in >> bad shape, etc. Moreover, I don't think "atexit()" knows if the daemon >> is being killed because a service timeout or because somebody just >> uploaded a new wsgi script. >> >> -- >> Jesús Cea Avión _/_/ _/_/_/ _/_/_/ >> j...@jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ >> Twitter: @jcea _/_/ _/_/ _/_/_/_/_/ >> jabber / xmpp:j...@jabber.org _/_/ _/_/ _/_/ _/_/ _/_/ >> "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ >> "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ >> "El amor es poner tu felicidad en la felicidad de otro" - Leibniz >> >> -- >> You received this message because you are subscribed to the Google Groups >> "modwsgi" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to modwsgi+unsubscr...@googlegroups.com. >> To post to this group, send email to modwsgi@googlegroups.com. >> Visit this group at https://groups.google.com/group/modwsgi. >> For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+unsubscr...@googlegroups.com. To post to this group, send email to modwsgi@googlegroups.com. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.