We are running a number of fairly average volume Django sites (approx
20000 uniques a day).

Since moving to mod_wsgi from mod_python a month ago, we have been
experiencing occasional high memory usage (every couple of days or so)
leading to
serious unresponsiveness, which is only resolved by restarting Apache.

During these periods our traffic has been minimal as has been our
database load.

We are running the sites on two load-balanced servers (the database
and
media server are on different machines). There are approx 60 sites in
total, all running on the same codebase but in separate VirtualHosts
and WSGIDaemonProcesses.

I was wondering if the issue could be with the large number of child
processes, as we have so many.
We have tried tinkering with the configuration by adding maximum-
requests and inactivity-timeout (the
traffic varies from site to site a great deal) but the problem is
recurring.

I'd like to be able to eliminate mod_wsgi as the issue by ensuring
that
we have the optimum configuration for our case and we aren't doing
anything stupid.

If Apache/mod_wsgi isn't the problem then the issue is most likely our
own code, but I'd like to
avoid premature optimization.

Here is our Apache configuration:

Apache settings (prefork):

StartServers       8
MinSpareServers    5
MaxSpareServers   30
ServerLimit      30
MaxClients       30
MaxRequestsPerChild  150

and a typical WSGI configuration (60+ of them, identical configuration
except for names):

<VirtualHost *.80>
    ServerName site1.com
    ServerAlias site1.com
    WSGIScriptAlias / /path/to/site1/site.wsgi
    WSGIDaemonProcess site1.com threads=10 display-name=wsgi.site1
maximum-requests=3000 deadlock-timeout=30 inactivity-timeout=300
 WSGIProcessGroup site1.com
</VirtualHost>
-- 
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.


Reply via email to