Apache keeps restarting
Hi guys,
Apache keeps restarting gracefully and I don't know why!
Here is a snippet from the logs:
Jul 13 14:52:49 2016] [error] [client 98.221.10.74] File does not exist: /usr/local/apache/htdocs/405.shtml
[Wed Jul 13 14:52:49 2016] [error] [client 98.221.10.74] File does not exist: /usr/local/apache/htdocs/405.shtml
[Wed Jul 13 15:12:29 2016] [error] [client 24.15.14.95] File does not exist: /usr/local/apache/htdocs/favicon.ico, referer:
[Wed Jul 13 16:03:28 2016] [notice] Graceful restart requested, doing restart
[Wed Jul 13 16:03:28 2016] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Wed Jul 13 16:03:28 2016] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Wed Jul 13 16:03:28 2016] [notice] Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.0-fips mod_bwlimited/1.4 configured -- resuming normal operations
[Wed Jul 13 16:03:40 2016] [error] [client 100.0.82.196] File does not exist: /usr/local/apache/htdocs/405.shtml
[Wed Jul 13 16:03:40 2016] [error] [client 100.0.82.196] File does not exist: /usr/local/apache/htdocs/405.shtml
This happens almost every 2 hours or randomly. Sometimes it goes hours without restarting. It looks like it started happening 5 days ago.
Attached is a pic of my memory usage. I don't think it's that. I've enabled piped logs after reading about it here.
Can you guys point me in the right directin?
-
This is likely caused by someone adding a domain or sub domain. Are there any errors before the restart? 0 -
There are no errors and I'm the only one who has access.....I'm not adding any domains or sub domains. 0 -
Hello, The following post explains why Apache restarts every two hours by default, and why it's normal: Why is Apache restarting every two hours? Let us know if you have any questions about this post. Thanks! 0 -
Thanks Michael! Informative. Just one question though. I hadn't been on WHM in months and this all of a suddenly started happening on the 8th. I enabled piped logging after reading a few posts here (somehow I missed the one you linked, apologies) and it still restart last night at midnight. Shouldn't it have not restarted last night? I enabled piped logging yesterday evening. 0 -
Thanks Michael! Informative. Just one question though. I hadn't been on WHM in months and this all of a suddenly started happening on the 8th. I enabled piped logging after reading a few posts here (somehow I missed the one you linked, apologies) and it still restart last night at midnight. Shouldn't it have not restarted last night? I enabled piped logging yesterday evening.
Hello, You will also notice Apache restarts when a cPanel or WHM user performs a change that involves modifying the httpd.conf file (e.g. adding/removing addon or subdomains). Or, in some cases, you may notice this with automatic package updates on EasyApache 4. Keep in mind that "Graceful Restarts" are generally accepted and don't result in downtown. There's documentation from Apache that explains this:0 -
Thanks Michael, I'm a total noob so can you tell me where I check for automatic updates? Certainly no one else is making changes to httpd.conf. Thanks, Pedro 0 -
webhost manager> update preferences note: you must be running easyapache4 easyapache3 does not auto update 0 -
So I am running easyapache3. Can we keep this thread open? I'm going to see how it goes. 0 -
You can review the YUM log at: /var/log/yum.log You can also check the the cPanel update log with a command such as: grep restartsrv_httpd /var/cpanel/updatelogs/*
An entry like this is normal during cPanel updates:*** Running updateuserdomains *** *** Done updateuserdomains *** *** Running apache_conf_distiller *** Distilled successfully *** Done apache_conf_distiller *** *** Running build_apache_conf *** Built /usr/local/apache/conf/httpd.conf OK *** Done build_apache_conf *** *** Running restartsrv_httpd *** Waiting for "httpd" to restart "waiting for "httpd" to initialize "finished.
Thank you.0 -
Hi, So I get permission denied when running those commands. I can't even sudo them. Where in WHM or cpanel are the user accounts listed? I need to change password on root as I don't know it. Thanks, Pedro 0 -
Hello, Are you sure that you are reviewing /var/log/yum.log with a command such as "cat" instead of simply entering the path to the log file? For instance, you would view a log file like this with a command such as: cat /var/log/yum.log
Your request for root access assistance is handled on the following thread: Root Access Thank you.0 -
So no entries in the yum.log for that string Michael! Is there any other logs I should be checking? The restarts only started to happen around July 8th, just curious as to what changed as I certainly did not log into it WHM/Cpanel and make changes. ..and thank you very much for your help, it's been great! 0 -
So no entries in the yum.log for that string Michael! Is there any other logs I should be checking? The restarts only started to happen around July 8th, just curious as to what changed as I certainly did not log into it WHM/Cpanel and make changes. ..and thank you very much for your help, it's been great!
Were you able to check the cPanel update logs referenced in the earlier post to this thread? Thank you.0 -
Yes, sorry, I ran the grep command on the cpanel logs. I looked at the yum log, maybe I missed something. What am I looking for there? 0 -
New Yes, sorry, I ran the grep command on the cpanel logs.
Could you let us know the output when you run that command? Thank you.0 -
It returns nothing! 0 -
Keep in mind the Apache restarts are by design. It's likely a subdomain was added, or some other normal action resulted in the restart. Feel free to open a support ticket using the link in my signature so we can take a closer look and determine which action resulted in the graceful restart. You can post the ticket number here so we can update this thread with the outcome. Thank you. 0 -
Hmm, I don't have any of those type of accounts, I don't think. It's not restarting any longer (except at midnight which is fine) so the problem is solved. I just wanted to know why it started doing it all of a sudden. I'll wait until it happens again. THank you very much for your help Michael, really appreciate it. 0
Please sign in to leave a comment.
Comments
18 comments