random issues with python flask application on apache
Obviously a programming issue, but made worse by running a multiprocess configuration. Read:
and also perhaps watch:
They explain the need to be careful of how you setup Apache.
UPDATE 1
Based on the configuration you added, you are missing:
WSGIProcessGroup website
Your code will not even be running in the daemon process group. So you are at the mercy of whatever MPM you are using and how many processes it is running.
UPDATE 2
Your Directory block is wrong. It is not referring to the directory. Should be:
<Directory /web> WSGIProcessGroup website WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all</Directory>
The WSGIScriptReloading directive is not needed as that is the default.
UPDATE 3
Since you are not providing your exact configuration and so we cant now for sure that what you are giving is the same, to absolutely confirm that you are using daemon mode and thus only maximum 2 processes, do the tests at:
- http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Embedded_Or_Daemon_Mode
- http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Sub_Interpreter_Being_Used
You want to get 'website' and ''. Meaning daemon mode and main interpreter.
That we know we are actually talking just about the memory usage of the two daemon processes.