Did Everyone's Apache Server Go Dead at the same Time?

Re: Did Everyone's Apache Server Go Dead at the same Time?

Postby KnightMB » Feb 1st, '14, 15:26

It happened again like clockwork. so I found the culprit finally. :shock:

LogRotate is calling Apache to reload and for whatever reason, Apache can't reload (shows up in the logs that the graceful restart was called, but never makes it)

Solution to the problem (that doesn't mean uninstalling LogRotate).

Edit file /etc/logrorate.d/httpd

Change code to and save. Restart Apache afterwards just to be safe it does not happen again next month.
Code: Select all
/var/log/httpd/*_log /var/log/httpd/apache_runtime_status /var/log/httpd/ssl_mutex {
    rotate 5
    copytruncate
    monthly
    missingok
    notifempty
    nocompress
}


This will have logroate simply copy the log file, then truncate it so Apache can keep writing to it like normal. Apache will not need to be called for a restart and everything is good again. :D
User avatar
KnightMB
 
Posts: 76
Joined: Nov 21st, '12, 21:27

Re: Did Everyone's Apache Server Go Dead at the same Time?

Postby filip » Feb 1st, '14, 15:40

Nice. Finger crossed.
filip
 
Posts: 478
Joined: May 4th, '11, 22:10
Location: Kranj, Slovenia

Re: Did Everyone's Apache Server Go Dead at the same Time?

Postby claire » Feb 3rd, '14, 20:36

Can you please add this information in a bug report so that it can be fixed for everybody.

Thanks
Help to make Mageia! Get involved.. Please come and join us
claire
 
Posts: 161
Joined: May 28th, '11, 19:17
Location: UK

Re: Did Everyone's Apache Server Go Dead at the same Time?

Postby KnightMB » Mar 2nd, '14, 00:38

1 Month later and this solved the issue on all servers. The log rotation restart Apache command was the culprit and changing the command to merely copy/truncate the logs was the better solution.
User avatar
KnightMB
 
Posts: 76
Joined: Nov 21st, '12, 21:27

Re: Did Everyone's Apache Server Go Dead at the same Time?

Postby doktor5000 » Mar 2nd, '14, 01:16

claire wrote:Can you please add this information in a bug report so that it can be fixed for everybody.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Did Everyone's Apache Server Go Dead at the same Time?

Postby KnightMB » Mar 2nd, '14, 01:29

doktor5000 wrote:
claire wrote:Can you please add this information in a bug report so that it can be fixed for everybody.

My apologies, did not know this was directed to me. On the bright side, it may have taken a month, but I know the fix works now when I submit the bug report. :mrgreen:
User avatar
KnightMB
 
Posts: 76
Joined: Nov 21st, '12, 21:27

Previous

Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron