Virtualmin Issues: Apache dying every week at midnight

Issues : 100% http cpu load, Server Hangs, Http Dying Every Week

There are lot of things I've done.

1. Check the cron jobs every week and change some weekly jobs and spread it on random day to another day like sat so they will spread the load

2. Create a script that auto checks that apache every 5 min there is a howto on the internet you can follow just google it.


3. This is the last thing that I've been doing read below:

I've been looking for a solution on this one for quite long time now and havent figured it out. Log of apache doesnt give a clue. Maybe others logs have a clue the last log I havent checked was the logrotate logs. ( the log of the log rotator lol)

I run the logrotate and poof! server down :D some freaking code there. I checked and found that the virtual sites rotates the log and invoking a restart of the httpd. I checked and tried and change the restart to graceful but no avail.

So why do the server needs to be restarted?? Dunno really maybe to clear and strip the log but I dont need that. So I removed the restarting command:


On the logrotate command Webmin -> Systems Go to Log Rotation

Remove the following:

/usr/sbin/apachectl graceful
/etc/rc.d/init.d/httpd restart

these commands restart the httpd every time the logs are rotated

Then Run the log rotate "Force Rotate All Logs" this will try to rotate them. There should be no errors

I triend rotating again and found some xfer and vsftpd error i edited them I got this error also
error: vsftpd.log:7 duplicate log entry for /var/log/xferlog so I huriedly check them and fix also

Rotate again no errors now. Think this will solve the issue. If you stumbled on this blog and found that this solved the issue kindly leave a comment so I might know if I need another solutions.


There is a know bug on httpd version Apache/2.2.3

and I think still persist so here we are doing some weird scripting

Comments

Popular posts from this blog

Black screen after logging in on Windows 2012 R2 using domain credentials on remote desktop connection

Water Wonder Resort

Client denied by server configuration error