Question

Does having a large access log file hinder performance? What is an appropriate file size limit for Apache2 logs? I have log rotate running in cron daily, and the limit is 52 MBs, but this is run once a day and the log file is getting to about 200 MBs before the day is done and the log rotates. Should I have log rotate run a couple times through the day to rotate more often, or is this file size not going to hinder performance enough to bother with this?

Was it helpful?

Solution

I don't think having a large log file will cause a performance hit to apache. It uses handlers that simply append messages to the end of the file. The thing you do want to look out for, however, is your partition becoming full.

If you really needed to, you could create a special cron task to run logrotate against your apache2 logrotate configuration a few more times every day:

sudo crontab -e

4,8,12,16,20 * * * * /usr/sbin/logrotate -f /etc/logrotate.d/apache2

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top