Tip: Check those Apache log files

A problem that I’ve been asked to fix several times now is a slow Apache server. In several of these cases the slowness was caused because of the size of the logs. Most servers are set up to rotate the logs, but everynow and then things can go awry and the rotation stops. On a busy server you can find the logs growing over 500MB over the course of a couple of weeks. Once they get to this size it will generally start to slow Apache down as it has to open and write to that logfile.

I’ve seen logfiles that had grown to greater than 1GB and Apache really starts to strain at that point.

So… don’t forget to check the logs in /etc/httpd/logs (and /etc/httpd/domlogs if you have CPanel accounts). If the logfiles aren;t rotaing then logrotate is your friend (and youshould get acquainted with it right now).