Apache restarting : "Graceful restart requested, doing restart"

This is likely due to log rotation that is scheduled to run regularly. In Debian and derived distributions, you can look at /etc/logrotate.d for the log rotation scripts for Apache.

Log rotation is a good practice, this way the log files won't fill up your hard disks.


Graceful restart requested is normal in Apache -- part of crontab rotation. If you poke around in your /var/log/auth.log (or equivalent on your distribution) you will see the crontabs being run regularly.

Poke around further by looking at your crontabs: with ls -l /etc/cron* or equivalent on your distro you will find a list of all your crontabs run by root automatically. One of them will be /etc/cron.daily/logrotate which will run the equivalent of

/usr/sbin/logrotate /etc/logrotate.conf 

which in turn has a line within it:

include /etc/logrotate.d

which has a list of log rotation scripts, one of them being /etc/logrotate.d/apache which on mine starts off:

/var/log/apache2/*.log {
    daily

You can adjust it to run more or less frequently if you like, but the base settings on my server are good enough.