Wednesday, May 30, 2007

Increasing MaxClients

I noticed that in times of increased activity, my servers weren't responding. Having a look at the logs revealed "server reached MaxClients setting", so I was just stilling in a queue until somebody dropped off the server. Not a great position to be in when your client is shouting down the phone!

So, a quick trip to apache.conf which lives in /etc/apache2 on debian3.1 and a change to the settings.

I've created the following settings for the conf file: each section is part of the IfModule preforc declaration. A quick restart of apache and all is well.

StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 256
MaxRequestsPerChild 1000
StartServers 2
MaxClients 256
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0

No comments: