Apache seems to be restarting everyday

martynh

Active Member
Oct 6, 2009
32
0
56
Hello,

I have been checking my Todays CPU usage everyday for the last week and noticed the following:

root 2.74 9.91 1.9
Top Process %CPU 77.0 /usr/local/apache/bin/httpd -k graceful

Why is apache getting restarted everyday? is this a fault or a setting somewhere?

Thank you!
 

Spiral

BANNED
Jun 24, 2005
2,020
8
193
Apache restarting is perfectly normal and may actually happen hundreds of times throughout the course of the day without you even being aware of it.
Anytime users change some settings, anytime you add or delete an account, addon domain, or subdomain, apache will be restarted. When you update the system, Apache is often restarted so this is normal.

One thing that does concern me is the "77%" and for that I would take a little closer looker to see what is going on or what was happening in the server at that specific time.
 

martynh

Active Member
Oct 6, 2009
32
0
56
Hello,

Thanks for the reply, yes thats the only thing that made me notice it today with it been 77% although I noticed the top line saying its based on 1 cpu so I guess its just a quarter of that...

is there a way of seeing what was going on at that time?

Thanks once again spiral :D
 

Spiral

BANNED
Jun 24, 2005
2,020
8
193
If you are looking at it live, "top" helps a bunch ;)

However, after the fact, you would want to try to get a fix on the time and then check that time against all logs to get a better feel what was going on around that particular time:

/var/log
/usr/local/apache/domlogs
/usr/local/apache/logs
/usr/local/cpanel/logs