On 15/01/2015, at 8:32 AM, Kent <[email protected]> wrote: > Graham, the docs state: "For the purposes of this option, being idle means no > new requests being received, or no attempts by current requests to read > request content or generate response content for the defined period." > > This implies to me that a running request that is taking a long time could > actually be killed as if it were idle (suppose it were fetching a very slow > database query). Is this the case?
This is the case for mod_wsgi prior to version 4.0. Things have changed in mod_wsgi 4.X. How long are your long running requests though? The inactivity-timeout was more about restarting infrequently used applications so that memory can be taken back. > Also, I'm looking for an ultra-conservative and graceful method of recycling > memory. I've read your article on url partitioning, which was useful, but > sooner or later, one must rely on either inactivity-timeout or > maximum-requests, is that accurate? But both these will eventually, after > graceful timeout/shutdown timeout, potentially kill active requests. It is > valid for our app to handle long-running reports, so I was hoping for an > ultra-safe mechanism. > Do you have any advice here? The options available in mod_wsgi 4.X are much better in this area than 3.X. The changes in 4.X aren't covered in main documentation though and are only described in the release notes where change was made. In 4.X the concept of an inactivity-timeout is now separate to the idea of a request-timeout. There is also a graceful-timeout that can be applied to maximum-requests and some other situations as well to allow requests to finish out properly before being more brutal. One can also signal the daemon processes to do a more graceful restart as well. You cannot totally avoid having to be brutal though and kill things else you don't have a fail safe for a stuck process where all request threads were blocked on back end services and were never going to recover. Use of multithreading in a process also complicates the implementation of request-timeout. Anyway, the big question is what version are you using? Graham -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
