Well-Known Member
Feb 28, 2005
Las Vegas
Apache on my brand new shiny dedicated managed server is shutting down every hour or so.

From the managers...
The problem appeared to be the http usage was running high and wasn't serving the pages
The log I setup only tracks the number of connections, it doesn't track the domain getting the traffic. Since the traffic is spikes only, it's hard to see what sites are being hit when it does spike. When I look at it now, the traffic is normal, about 15 connections. But all of a sudden it may spike to 300+ connections then fail, and by the time it is seen, the stats showing which domains are being accessed are inaccessible.

There must be some way log what is being hit to the last second before apache shut-down.

I have about 150 domains with only 4-5 with any kind of activity.

When the server was first activated I got a lot of...
httpd failed @ Sun Dec 10 04:48:59 2006. A restart was attempted automagicly.

They shut off the 'internal http restarts' to see what the problem was.
I went to the Grand Canyon. Came back only to find the server not serving for 24 hours!!!

For some reason they won't turn 'internal http restarts' back on, but they just put in System Integrity Monitor with a warning that it doesn't always restart apache!

Any ideas will be appreciated.


Well-Known Member
Sep 25, 2002
St. Charles, MO
I have used this line running from cron every 5 minutes. Don't forget to set up log rotate.

*/5 * * * * /root/scripts/apache-status.pl >> /var/log/apachestatuslog


@output = `lynx -width=190 -dump`;

print @output;

I also created another two scripts to display that output in a way to count the number of times a specific IP is connected. For attacks, offline web browsers etc.



@apachestatus = `/bin/bash formatted-status.sh`;

%seen = ();
foreach $item (@apachestatus) {
@values = values %seen;
@uniq = keys %seen;

print "\nIP connections \n";
foreach $v (@values){
$h = $uniq[$count];
printf("\t%6.0f %s",$v,$h);
print "\n";




lynx -width=190 -dump | sed -n 55,204p | awk '{print $11}'