2008/11/29 William Dode <[EMAIL PROTECTED]>:
>
> Hi,
>
> i've a little virtual server with few websites with very low traffics
> and one website with more traffic (100000 hits/day). Most of the time it
> works very very well, very fast, without using too much memory...
>
> But sometimes the load goes very high, i don't know why, i imagine that
> it's because of somes web spiders or attack or a bug in my application.
>
> I would like somes tips to configure apache to can handle this problem.
>
> I use apache-worker and mod_wsgi in deamon mode.
>
> For the mod_wsgi app i use threads=1 (my app is not thread safe) and max
> request=1000 (for memory leak)

Can you post all the WSGI related directives you have in your Apache
configuration so can see exactly what you have an whether it is
correct.

> for apache i did this : BUT DON'T THINK IT'S CORRECT

For your size site (approx 1-2 request/sec average) you could have
just left default Apache worker configuration as is and the site would
probably have worked fine. I wish people would stop trying to
prematurely optimise performance when it isn't necessary, especially
when they don't really understand Apache configuration and are likely
to do more harm than good. :-(

The thing that is more likely to kill you is your application not
being thread safe, although depends on how you have setup WSGI
directives, which you didn't supply. So, post the WSGI bits of the
configuration and would then be able to comment more.

Also indicate what the WSGI application is written in. Ie., which framework.

Graham


> ServerLimit 4
> StartServers 1
> ThreadsPerChild 40
> MaxClients 40
> MinSpareThreads 5
> MaxSpareThreads 20
> MaxRequestsPerChild 1500
> LimitRequestBody 5000000
> ThreadStackSize 524288
> ExtendedStatus On
>
> If i understand correctly, there is no reason to limit the requests per
> child and the threadsperchild since i use maximum_requests in mod_wsgi.
> Isn't it ?
>
> My app is not very optimised (even if most of the times my pages have an
> average of 0.04s), but if because of a bug my app answer very slowly and
> a lot of people makes requests (it's a game, if they don't see the
> answer immediatly thy will hit refresh like crazys!). Apache will need
> a lot of threads to accept the connections and make them wait isn't it
> ? Should i configure apache to create a lot of threads or should
> i configure apache to refuse new connections ?
>
> thanks for any idea !
>
>
> --
> William Dodé - http://flibuste.net
> Informaticien Indépendant
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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