sankarNarayanan / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

How to use the same environment for different children of httpd? #149

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Does anyone know how to let all children of httpd use the same environment?
For example, I use modwsgi with Pylons to establish my website. And I set
the following setting in my httpd.conf

WSGIApplicationGroup %{GLOBAL}
WSGIProcessGroup %{GLOBAL}
WSGIDaemonProcess %{GLOBAL} processes=1 threads=5
WSGIImportScript /i-data/f0092d81/public/aslan/aslan.wsgi
process-group=%{GLOBAL} application-group=%{GLOBAL}

After that, the memory usage is up to 20MB for each child process of httpd
when starting httpd. I used strace to find the reason, and I found all of
httpds will to load the libraries of Pylons and Python by themself.

This is terrible. If I have 10 httpd processes in my pc, the memory usage
will up to 200MB. 

I only run ONE Pylons's application in my pc. Therefore I thought they
shall use the same libraries to save the usage of memory.

Does anyone can provide me some solutions? 

Original issue reported on code.google.com by cocoke...@gmail.com on 3 Jul 2009 at 2:48

GoogleCodeExporter commented 8 years ago
You have configured it wrongly. Use:

WSGIApplicationGroup %{GLOBAL}
WSGIProcessGroup aslan
WSGIDaemonProcess aslan threads=5
WSGIImportScript /i-data/f0092d81/public/aslan/aslan.wsgi process-group=aslan 
application-group=%{GLOBAL}

For this type of configuration question, please use the mod_wsgi mailing list 
on Google Groups.

http://groups.google.com/group/modwsgi

If the above still doesn't help, start a discussion on the list rather than 
following up here.

Original comment by Graham.Dumpleton@gmail.com on 3 Jul 2009 at 3:43

GoogleCodeExporter commented 8 years ago

Original comment by Graham.Dumpleton@gmail.com on 6 Jul 2009 at 10:30