Hi everyone,

We've been trying to debug a strange problem in our mod_wsgi/apache 
configuration.  We have a mostly working configuration that serves 
thousands of successful requests per day, but a few requests will 
incorrectly return a 404 (same request will work again immediately after). 
 We noticed that when we restart our webservers, we also get a bunch of 
404s for the first requests which we always handled by quickly refreshing 
the page until they stopped.  We've configured our daemon processes to 
restart after several thousand requests, so it seems like the random 404 
are caused by a daemon process just starting (looking through apache logs, 
the access log reports a 404 and there's output in the error log indicating 
our app modules have been loaded again at the same time, but nothing else). 
 Our wsgi application is a bit slow to load (on the order of couple hundred 
miliseconds, and maybe 1 or 2 seconds if there's a lot of load), so maybe 
there is some kind of timeout the apache processes have waiting for results 
from a daemon?

Really appreciate any ideas or suggestions on how to debug.

Here's relevant version and config info:
Apache/2.2.22
Python/2.7.3
mod_wsgi/3.3
werkzeug/flask .8


apache2.conf:
LoadModule wsgi_module modules/mod_wsgi.so
...
WSGIRestrictEmbedded On
WSGISocketPrefix /var/run/wsgi
WSGIPythonHome /python/home/directory
...
<VirtualHost *:80>
...
WSGIDaemonProcess group_name processes=10 threads=15 display-name=worker 
maximum-requests=10000
WSGIProcessGroup group_name
WSGIScriptAlias / /path_to_wsgi
WSGIApplicationGroup %{GLOBAL}
...
</VirtualHost>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/modwsgi/-/qINw6J75kHAJ.
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.

Reply via email to