You can try attaching gdb and dump C stack of all threads: http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Debugging_Crashes_With_GDB
Or you can try getting Python stacks out instead: http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Extracting_Python_Stack_Traces If it is pegging CPU, not sure how hard that may be. In mod_wsgi 4.0 there is a new option for daemon mode process have been experimenting with called 'cpu-time-limit'. It can cause a process to be restarted when certain amount of CPU usage reached. It could be used as failsafe to try and shutdown rampant process, but then it can't distinguish between normal and abnormal usage, so even in normal usage it will cause process to be restarted. In mod_wsgi 4.0 there is also a new graceful-timeout option for daemon processes which means that for normal case at least, it tries to avoid interrupting concurrent or active requests. Although inactivity-timeout can also help to try and restart processes when things go wrong like this where could be no reads on request content or not returning of response content, it also applies to no requests case as well. I intend though to add a blocked-timeout and separate things so separate timeouts for no requests at all case from case where all threads in process showing no activity on input/output. So going forward at least, may have some better options which can help automatically recover from this. As to debugging it now, using above methods is all I can suggest. Graham On 27 September 2011 02:05, Chris Withers <[email protected]> wrote: > Hi All, > > What's the best way to debug a multi-process, single-thread daemon-mode > mod_wsgi process? > > We're seeing several of these processes chewing up as much CPU as they can, > when we kill one of them, everything starts responding again. > Nothing apparently useful in the error log and no sign of the killed process > in the access log. > > Using mod_wsgi 3.3, Apache 2.2.17... > > cheers, > > Chris > > -- > Simplistix - Content Management, Batch Processing & Python Consulting > - http://www.simplistix.co.uk > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
