A script restarts Apache daily, is this correct behaviour?
just getting to grips with my dedicated server
lethal0r
9:27 am on Oct 2, 2006 (gmt 0)
A script in the init.d directory (am using Debian) restarts httpd each day, should it be doing this?
If so, can someone explain to me why it does this?
If it doesnt need to do this, can I safely delete the script?
pmkpmk
9:32 am on Oct 2, 2006 (gmt 0)
This might be due to two reasons:
A failsafe, for unstable Apache configurations to make a clean start every day
A log-rotating facility, to start fresh logfiles each day
Usually Apache restarts within seconds, so if you don't have actual trouble with the restart I see no reason to change it.
jdMorgan
3:45 pm on Oct 2, 2006 (gmt 0)
It's also a good idea to check your stats for traffic levels, and set the script so that it restarts during the lowest-traffic time of the day -- Like 3 AM local time if your traffic is mostly from one region.
Jim
lethal0r
7:07 pm on Oct 2, 2006 (gmt 0)
thanks guys. my log files do rotate daily so I would presume thats the reason its being restarted. and I could do with putting the restart time back a couple of hours.
pmkpmk
7:25 am on Oct 4, 2006 (gmt 0)
Check whether your logrotate gets started from cron as well or whether the rotation time is configured somewhere. The times need to match of course.