0

We monitor the number of apache processes via cacti. I noticed that the processes got up to 70 and then dropped down to 20ish. What can cause apache to do this? Here is our prefork settings

StartServers       50
MinSpareServers    10
MaxSpareServers    100
ServerLimit       250
MaxClients        250
MaxRequestsPerChild  3000

2 Answers 2

5

You have StartServers > MinSpareServers, and MaxRequestsPerChild set.

That means that after a server has serviced 3000 requests, it will die. The controller will then look at the rest of the servers, and add up the number which are idle. If this at least 10, then it won't restart one.

Therefore it looks like your website is serving about 10 requests at the same time, and this is normal behaviour.

It may be that your website has particularly 'bursty' type hits, where a lot of requests come in at one time. If this is the case you might want to increase the MinSpareServers.

0
2

From your settings..

Apache will always start with 50 (StartServers) processes. From thereon it will keep between 10 (MinSpareServers) and 100 (MaxSpareServers) idle processes running, which are those not currently serving any requests, in addition to any processes which are serving requests. The total of number of idle and active processes will never exceed 250 (MaxServers). Each process will be killed off once it has served 3000 (MaxRequestsPerChild) requests.

A count of 20 processes means that at least 10 or more of those are idle, waiting to serve requests. The remainder may be idle or active. Apache will scale the number of processes up and down within the parameters you have specified according to load.

You may wish to take a look at mod_status for more detailed information about what each of these processes are doing. Just be sure to secure it sufficiently.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .