Forum Moderators: phranque

Message Too Old, No Replies

Apache Live Processes Monitoring

Restarting when too many

         

windspinner

8:57 am on Sep 19, 2006 (gmt 0)

10+ Year Member



I'm quite new on this, I inherited a system that has a running Apache Server which in turn is monitored by a cron every minute that restarts it once it has more than 21 processes running on it.

Now, I am not so sure why my predecessor did this. I am thinking that maybe he's concerned with getting too many processes and eventually slowing down the server. Also is number of processes = number of users logging in or visiting your site.

I got into a little trouble this morning when I had more than 36 processes running on Apache and the cron just kept restarting Apache for 30 minutes or so, which is quite stupid.

Any help?

jdMorgan

2:18 pm on Sep 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need to ask your predecessor or his boss why this function might be in place. And certainly don't take the blame for an undocumented legacy function that you inherited.

Processes have nothing to do with the number of visitors, except by extension -- One visitor may invoke dozens of processes at any given moment, depending on how the Web pages he/she is viewing are coded. If one visitor typically invokes a dozen processes, then 20 visitors may well invoke hundreds.

Althought many of these processes are started and end almost instantaneously, 21 seems like a very low number to restart the server.

The key to this is to find out why the cron job was determined to be necessary. If no-one knows, it might just be a "parting gift" from a disgruntled ex-employee. At best, it is a workaround for a fault elsewhere in the server -- a bad script that uses too much CPU or hangs occasionally, or a database that uses too much memory, etc.

Jim

windspinner

6:12 am on Sep 20, 2006 (gmt 0)

10+ Year Member



Thanks.

Yeah, it didn't make sense why the httpd server was to restart itself upon reaching 21 processes. Thing is, I might not be able to contact my predecessor, but anyways, yes, I gotta fix that shell script. Thanks again.