Take the 2-minute tour ×

I edited my httpd.conf to have the following

StartServers          2
MinSpareServers       2
MaxSpareServers       4
MaxClients          150
MaxRequestsPerChild   0

but when I do a

root@server [/usr/local/apache/conf]# ps aux | grep httpd | wc -l

I get 65-75 processes.
Any ideas why the setting is not taking effect ?
I'm using prefork, in case that helps.

share|improve this question
PS. For those curious, I tried using IfModule prefork, doesn't work as well. –  Adrian A. Jan 21 '11 at 9:18
Is your system under any load? It might just have spawned new httpd processes to handle the volume of traffic. –  Mike Scott Jan 21 '11 at 9:24
Yes, it under serious load, but merely because of the new spawned httpd's, it's overwhelming the system. –  Adrian A. Jan 22 '11 at 21:47

2 Answers 2

up vote 2 down vote accepted

MaxSpareServers merely tells Apache how many idle processes it maintains, while MaxClients tells it how many clients it can serve at the same time and with the prefork worker, this means number of processes. So, in your case Apache can create up to 154 processes

Is it possible that you serve around ~70 clients at the same time or that requests doesn't finish normally for some reason, thus keeping the request alive?

share|improve this answer
You could try running 'ab' to try and saturate the server - though it appears the system is working exactly as it should - why try and break it? –  symcbean Jan 21 '11 at 11:11
I will try to play with MaxClients. I already have Nginx working as a proxy, that's why I'm trying to reduce the Apache instances. –  Adrian A. Jan 22 '11 at 21:52

Let's start with the basics: did you restart apache after editing your config file? You need to do that with

/usr/sbin/apachectl graceful

or similar. Apache won't use the new settings until you do that.

share|improve this answer
Of course I did. –  Adrian A. Jan 22 '11 at 21:47

Your Answer


