Graham Dumpleton
Graham Dumpleton
What happens if just do: ``` iter(wrapper) ``` Does that even fail?
Can’t reply in detail right now but that looks like it is the Apache child worker process which proxies to the mod_wsgi daemon process. When a graceful restart is done...
Also what is keep alive timeout set to?
Since using daemon mode make sure have following set at global config scope. ``` WSGIRestrictEmbedded On ``` This ensures that Python is not being initialised in those Apache worker processes....
Set: ``` ServerLimit 2 ``` This is a hard limit on number of Apache worker processes that can run in parallel. Even if `MaxRequestWorkers` and `ThreadsPerChild` are set such that...
If the second restart was within 60 seconds of a prior one it could well stall on that one because you would already have been at limit. Anyway, if have...
How long are your longest requests? With default settings in mod_wsgi for daemon mode there is no proper request timeout. If the issue is that you have requests which are...
On each of special URLs which take longer, this post may be interesting. * http://blog.dscpl.com.au/2014/02/vertically-partitioning-python-web.html Shows how could split an application across two daemon process groups and tune each separately...
If you want to try and log each time the mod_wsgi daemon processes is consuming all request handler threads, use: ``` import mod_wsgi def event_handler(name, **kwargs): if name == 'request_started':...
There is also a `mod_wsgi.request_metrics()` function as well which I forgot about but some of what it gives may require a bit of explanation. Anyway, one can get all sorts...