I have this problem: There is one django source which is shared by
multiple apache vhosts. Each instance of django project has its own
settings and .wsgi script. Every vhost's WSGIDaemonProcess runs under
its own unique user.
WSGI apache processes running under their users die randomly. When it
happens, there is massive growth of apache www-data processes. It does
not happen at vhost which runs on another IP addres than other vhosts.
Do you have any idea why processes are dying? Thanks Kamil
There runs, Python 2.5.2 and, libapache2-mod-wsgi 2.5-1~lenny1
apache vhost config of one of virtual:
-------------------------------------------------------
<VirtualHost *:80>
ServerName xxxxx.com
ServerAlias www.xxxxx.com
WSGIApplicationGroup app_xxxxx_com
WSGIDaemonProcess xxxxx_com user=xxxxx_com group=xxxxx_com
processes=1 threads=10 maximum-requests=1000 inactivity-timeout=100
deadlock-timeout=100
WSGIProcessGroup xxxxx_com
Alias /media/ /srv/xxxxx_com/cgi-bin/project/media/
Alias /php/ /srv/xxxxx_com/cgi-bin/php/
Alias /downloads/ /srv/xxxxx_com/cgi-bin/project/downloads/
Alias /favicon.ico /srv/xxxxx_com/cgi-bin/project/media/
favicon.ico
Alias /robots.txt /srv/xxxxx_com/cgi-bin/project/downloads/
robots.txt
WSGIScriptAlias / /srv/xxxxx_com/cgi-bin/project_br.wsgi
ErrorLog /srv/xxxxx_com/log/error_xxxxx.log
LogLevel info
#CustomLog /srv/xxxxx_com/log/access_xxxxx.log combined
LogFormat "%h %l %u %t \"%r\" %>s %b PID%{pid}P THREAD%{tid}P
\"%{Referer}i\" \"%{User-agent}i\"" combined_s_pid
CustomLog /srv/xxxxx_com/log/access_xxxxx.log combined_s_pid
</VirtualHost>
--------------------------------------------------------------------------
Example of project.wsgi
project_xxxxx.wsgi
--------------------------------------------------------
import os, sys
sys.stdout = sys.stderr
PATH_TO_PROJECT = os.path.dirname(sys._getframe().f_code.co_filename)
+ '/'
for p in [PATH_TO_PROJECT + 'project/', PATH_TO_PROJECT]:
if not p in sys.path:
sys.path.append(p)
os.environ['PATH_TO_PROJECT'] = PATH_TO_PROJECT
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings_it'
from project import settings_it as settings
try:
p = settings.DJANGO_PATH
except AttributeError:
p = '/opt/django/trunk_%s/' % settings.DJANGO_REVISION
if not p in sys.path:
sys.path.append(p)
import django.core.handlers.wsgi
_application = django.core.handlers.wsgi.WSGIHandler()
def application(environ, start_response):
if environ['wsgi.url_scheme'] == 'https':
environ['HTTPS'] = 'on'
return _application(environ, start_response)
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
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.