Thoughts on Apache log file sizes?

Posted by Nathan Long on Server Fault See other posts from Server Fault or by Nathan Long
Published on 2010-04-02T15:24:02Z Indexed on 2010/04/02 15:33 UTC
Read the original article Hit count: 295

Filed under:

Do you place any limits on the size of Apache log files - access.log and error.log?

Specifically, can you give:

  • Reasons to limit log file sizes
    • Disk space
    • Any other?
  • Reasons NOT to limit log file sizes
    • Research into performance issues or security breaches
    • Any other?
  • Methods of doing so
    • Cron job that periodically deletes the file, or the first N lines?
    • Any other?
  • Anything you might salvage before deleting
    • For example, grep out how many times a file was downloaded before deleting the access logs

I'd like get the thoughts of experienced sysadmins before I do anything.

(Marking as community wiki since this may be a matter of opinion.)

© Server Fault or respective owner

Related posts about log-files