Home » WHM/cPanel » Apache Undergoing graceful restart automatically

Apache Undergoing graceful restart automatically

We faced the following issue as “Apache Undergoing graceful restart automatically”, similar to apache was getting restarted gracefully every two hours.

#grep graceful /usr/local/apache/logs/error_log
Tue Oct 15 16:16:08 2013] [notice] Graceful restart requested, doing restart
Tue Oct 15 18:12:53 2013] [notice] Graceful restart requested, doing restart
Tue oct 15 20:09:39 2013] [notice] Graceful restart requested, doing restart

It generally happens due to log processing. And we can fixed the issue by enabling piped apache logs using below method.
Create a backup copy of the Apache configuration file;

#cp -rp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf_prepipedlogging

Then edit /var/cpanel/cpanel.config:

#vi /var/cpanel/cpanel.config

And change it to as below.

enable_piped_logs=1

Make cPanel aware of the change:

#/usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings

Rebuild the Apache config:

/scripts/rebuildhttpdconf

Stop and Start Apache:

#service httpd stop
#service httpd start

OR
you can enable piped logs via WHM using the following steps;
Login to WHM >> Click Service Configuration >> Click Apache Configuration >> Click Piped Log Configuration

Then Check the box labeled Enable piped Apache logs and finally Click the Save button.

About

I am founder and webmaster of www.linuxpcfix.com and working as a Sr. Linux Administrator (Expertise on Linux/Unix & Cloud Server) and have been in the industry from last 7 years.

One thought on “Apache Undergoing graceful restart automatically

  1. http://twilightharbour.eeveeshq.com/ says:

    Thank you for the good writeup. It in truth was a leisure account it.
    Look complicated to far delivered agreeable from you! By the way,
    how could we be in contact?

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Time limit is exhausted. Please reload the CAPTCHA.

Categorized Tag Cloud