On Mon, Aug 10, 2009 at 6:43 AM, Graham
Dumpleton<graham.dumple...@gmail.com> wrote:
> These values for min and max threads are a bit dubious because you
> have a single process and that will have fixed 25 threads. Usually
> these are defined in multiples of ThreadsPerChild and not less like
> this. Possibly just  means the values are ignored.

The MaxClients (according to the Apache docs is #MaxServers *
#ThreadsPerChild) I just set it explicitly so I remember what it is,
though it is actually ignored


>> ThreadsPerChild 25
>> MaxRequestsPerChild 5000
>
> Don't see much point for MaxRequestsPerChild.

This just restarts the child after 5k requests, which helps clear out
some memory on occasion (I am still trying to get rrd or something run
on on Webfaction so I can actually map memory usage over time, and
start tuning Apache to my actual usage needs better)


>> WSGIPythonOptimize 1
>
> Am dubious that turning on optimisation helps and can cause problems
> if set to '2' as doc strings will be stripped.

I doubt it is much improvement, but I just turned it on as a test and
did read that 2 is a bad idea which is why I stuck with 1


>> <VirtualHost *>
>>     ServerName demo.digitalxero.net
>>     DocumentRoot /home/digitalxero/webapps/wsgi/demo
>>     WSGIDaemonProcess demo.digitalxero.net threads=5
>> maximum-requests=10000 inactivity-timeout=3600
>> display-name=wsgi:demo_site
>
> That is 1 hour for inactivity timeout. They possibly want something
> less than that.

Ya, I picked an hour for starters and will drop it down or increase it
as my needs dictate (one I get something to monitory usage better then
guessing)


> If you application does leak Python objects due to inability to break
> reference count cycles, there shouldn't really be a need for maximum
> requests.

Though my app does no leak, that I have noticed anyways, I figure a
maximum-requests would be good just in case I suddenly get a flood of
traffic, it will restart the daemon even if the hour of idle time has
not passed.

I run 5 sites right now and none of them get much more then 10
visitors an hour on average, and what prompted my investigations is I
was continually sitting at 95mb of ram usage (my account is supposed
to be limited to 80) and I was using the default apache build the WF
provided, which is prefork MPM and mod_python. Now I seem to be
averaging 36mb and 55 max


> Sorry, meant to say 'worker' rather than 'prefork'. DO NOT USE
> PREFORK. Hmmm, that was a bad stuff up. :-)

ahh ok, good to know my own testing concluded corectly

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to