3,806 reputation
2811
bio website blog.dscpl.com.au
location Sydney, Australia
age 48
visits member for 5 years
seen 7 hours ago
The grumpy old man. Work with C/C++/Python. Deep into Apache module development and C extension module development for Python.

17h
answered mod wsgi picks up wrong libpython2.7.so.1.0
Jul
5
comment Database connection to postgresql refused for flask app under mod_wsgi when started by systemd
FWIW, setting os.environ on each request from WSGI request environ argument is considered bad practice. SetEnv should not be used to set process wide environment variables in this way.
Jun
25
awarded  Yearling
Jun
14
comment Apache and mod_wsgi, worker process stuck to W state, request never dies. How to diagnose?
Are you using WSGIApplicationGroup %{GLOBAL}. There are various Python modules that will not work in sub processes and if they deadlock, will bring the process down. Anyway, you should hop on the mod_wsgi mailing list and monitor it, have some new monitoring tools that can help monitor issues like this that have been talking about recently.
Jun
9
comment Error starting mod_wsgi
I have updated README at github.com/GrahamDumpleton/mod_wsgi with information on non standard Apache installations and running as root.
Jun
9
comment Error starting mod_wsgi
At that point I would suggest that SELinux may be enabled on your system and is screwing things up. Try temporarily disabling any SELinux extensions and see if that helps. For details on how to do that see crypt.gen.nz/selinux/disable_selinux.html
Jun
9
comment Error starting mod_wsgi
If you intend it to be available on port 80 as would normally be used by public facing web sites, you have no choice but to start it as root. If starting as root, whether or not you have to override which httpd executable is used, you would have to specify the user and group. Can you at least try and work out from the httpd shell script on CentOS what the real Apache executable binary is as I will update documentation with details of that issue and how to start up as root.
Jun
9
comment Error starting mod_wsgi
The bigger problem is that on CentOS they appear to have replaced the original Apache executable with a shell script which does extra things which screws things up. You would need to find where the original Apache executable is and use the option --httpd-executable to specify the location of it.
Jun
9
comment Error starting mod_wsgi
If running as root, you would need to specify the --user and --group options and set them to whatever the Apache user is on the system, or some other user that you want your Python web application to run as. Normally a different approach would be used to get things setup if eventually intend running mod_wsgi express as root which I haven't described anywhere yet. This is where the mod_wsgi mailing list becomes a better place to discuss things.
Jun
9
answered Error starting mod_wsgi
May
31
answered Multiple python versions under apache+mod_wsgi
May
2
answered Tuning django based site deployed using apache wsgi for better performance
Mar
19
awarded  Good Answer
Mar
12
comment How to configure Apache with mod_wsgi so that error messages come from the application?
The default for WSGIErrorOverride is Off so you can simply remove it from the configuration.
Mar
11
answered How to configure Apache with mod_wsgi so that error messages come from the application?
Feb
19
answered Is graceful restart of Apache forcing to reload all python modules handled by mod_wsgi?
Feb
19
comment Apache Processes in top more than MaxClients
For capacity analysis, have a read of blog.newrelic.com/2012/09/11/…
Feb
19
answered How do I tell what request a mod_wsgi process is serving?
Feb
18
answered Apache Processes in top more than MaxClients
Feb
8
comment Why does httpd seem to use a different version of python with the same executable?
The only other thing can think of is that have seen this issue when the Python virtual environment was created off one Python patch level and then the main Python installation was upgraded without recreating the virtual environment.