#19208 closed Bug (fixed)
Daemon mode and mod_wsgi configuration.
Reported by: | Graham Dumpleton | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Documentation | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The mod_wsgi documentation at:
https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/
says:
"""
"Daemon mode" is the recommended mode for running mod_wsgi (on non-Windows platforms). See the official mod_wsgi documentation for details on setting up daemon mode. The only change required to the above configuration if you use daemon mode is that you can't use WSGIPythonPath; instead you should use the python-path option to WSGIDaemonProcess, for example:
WSGIDaemonProcess example.com python-path=/path/to/mysite.com:/path/to/venv/lib/python2.7/site-packages
"""
This information fails to mention that you also need to set WSGIProcessGroup to delegate the Django instance to run in the daemon process group. Worse is that it says 'The only change required to the above configuration if you use daemon mode'. Thus those who never actually read documentation properly and will just cut and paste will have issues.
Results is that keep seeing examples of people who have not done this and who have either done one of the following:
- Set WSGIPythonPath and python-path and then are oblivious to the fact that they aren't running in daemon mode and are still running in embedded mode.
- Don't set WSGIPythonPath and then get that Django settings module can't be found on startup because it doesn't know where to find it.
I noted this common problem of WSGIProcessGroup not being set in:
http://blog.dscpl.com.au/2012/10/why-are-you-using-embedded-mode-of.html
I didn't realise until now that Django documentation on mod_wsgi was contributing to that.
Suggest that:
"""
"Daemon mode" is the recommended mode for running mod_wsgi (on non-Windows platforms). See the official mod_wsgi documentation for details on setting up daemon mode. The only change required to the above configuration if you use daemon mode is that you can't use WSGIPythonPath; instead you should use the python-path option to WSGIDaemonProcess, for example:
WSGIDaemonProcess example.com python-path=/path/to/mysite.com:/path/to/venv/lib/python2.7/site-packages
"""
be changed to something like:
"""
"Daemon mode" is the recommended mode for running mod_wsgi (on non-Windows platforms). To create the required daemon process group and delegate the Django instance to run in it you will need to add appropriate WSGIDaemonProcess and WSGIProcessGroup directives. A further change required to the above configuration if you use daemon mode is that you can't use WSGIPythonPath; instead you should use the python-path option to WSGIDaemonProcess, for example:
WSGIDaemonProcess example.com python-path=/path/to/mysite.com:/path/to/venv/lib/python2.7/site-packages
WSGIProcessGroup example.com
See the official mod_wsgi documentation for details on setting up daemon mode.
"""
The link into the mod_wsgi documentation is probably best set to:
http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegation_To_Daemon_Process
Change History (5)
comment:1 by , 12 years ago
Component: | Uncategorized → Documentation |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
comment:2 by , 12 years ago
Owner: | changed from | to
---|
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In bc00075d51cd3e3b5f9a4d7d0f138e0a819adcb9: