I've deployed a django project on a mac running 10.8.x. I started off using 
'embedded' mode because that's what you do. I switched to daemon mode a few 
day ago. (I think, I've not run the test script yet because it's a live 
site and they're busy.)

Normally apache seems to run with about a dozen processes. I woke up this 
morning and there were over a hundred. That jump occurred over night. 
 Nothing in the logs would indicate any reason for that. I.e, there wasn't 
much happening. The error log hasn't had an entry in days.

This is the relevant portion of the httpd.conf file that I used to 
configure daemon mode:


WSGIScriptAlias / /Users/mysite/Sites/virtual/mysite/mysite/mysite/wsgi.py

WSGIDaemonProcess registration.mysite.org processes=2 threads=15 
display-name=%{GROUP} 
python-path=/Users/mysite/Sites/virtual/mysite/:/Users/mysite/Sites/virtual/mysite/lib/python2.7/site-packages
WSGIProcessGroup registration.mysite.org


This is the modwsgi.py file:


import os
import sys

import site

ALLDIRS = ['/Users/mysite/Sites/virtual/mysite/lib/python2.7/site-packages']
# Remember original sys.path.
prev_sys_path = list(sys.path) 

# Add each new site-packages directory.
for directory in ALLDIRS:
  site.addsitedir(directory)

# Reorder sys.path so new directories at the front.
new_sys_path = [] 
for item in list(sys.path): 
    if item not in prev_sys_path: 
        new_sys_path.append(item) 
        sys.path.remove(item) 
sys.path[:0] = new_sys_path 


site.addsitedir('/Users/mysite/Sites/virtual/mysite/lib/python2.7/site-packages')

path = '/Users/mysite/Sites/virtual/mysite/mysite/mysite'
if path not in sys.path:
    sys.path.append(path)
    sys.path.append('/Users/mysite/Sites/virtual/mysite/mysite/')
    os.environ['PYTHON_EGG_CACHE'] = 
'/Users/mysite/Sites/virtual/mysite/lib/python2.7'
    
activate_this = '/Users/mysite/Sites/virtual/mysite/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))    
    
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")


from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

I, of course, don't know that modwsgi is a factor, but since I think I'm 
controlling the number of processes with WSGIDaemonProcess, I thought I'd 
ask.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to