Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Apache Undergoing graceful restart every two hours  (Read 4047 times)

0 Members and 1 Guest are viewing this topic.

Haripriya H

  • Guest
Apache Undergoing graceful restart every two hours
« on: December 08, 2013, 10:21:49 pm »
one of the servers I am managing, I faced the following issue, like apache was getting restarted gracefully every two hours.

#grep Graceful /usr/local/apache/logs/error_log
[Tue Feb 05 18:16:08 2013] [notice] Graceful restart requested, doing restart
[Tue Feb 05 20:12:53 2013] [notice] Graceful restart requested, doing restart
[Tue Feb 05 22:09:39 2013] [notice] Graceful restart requested, doing restart
[Wed Feb 06 00:06:24 2013] [notice] Graceful restart requested, doing restart
[Wed Feb 06 02:03:09 2013] [notice] Graceful restart requested, doing restart
[Wed Feb 06 04:16:35 2013] [notice] Graceful restart requested, doing restart

I came to know this is due to log processing. And I fixed the issue by enabling piped Apache logs. This can be done by either of the following methods;

Make a backup of the Apache configuration file;
———————————————-
#cp -rp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf_prepipedlogging
Edit /var/cpanel/cpanel.config:
——————————
#vi /var/cpanel/cpanel.config
Add the following
—————–
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:
———————
/etc/init.d/httpd stop
/etc/init.d/httpd start

Or you can enable piped logs via WHM using the following steps;

*Make a backup of the Apache configuration file,cp -rp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf_prepipedlogging
*Login to WHM
*Click Service Configuration
*Click Apache Configuration
*Click Piped Log Configuration
*Check the box labeled Enable piped Apache logs
*Click the Save button