error_log occupied too much space and was not rotated

Created:

2016-11-16 12:49:22 UTC

Modified:

2017-04-24 11:18:23 UTC

1

Was this article helpful?


Have more questions?

Submit a request

error_log occupied too much space and was not rotated

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 10.4 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Log rotation for a domain is setup to rotate logs by size, but error_log file occupies too much space and not being rotated upon reaching the configured size.

Cause

Log rotation is performed by the Daily Maintenance script. This task will rotate a log file in case if its size is equal or larger than configured. So if the size of log file exceeds a particular limit, but the Daily Maintenance is not started yet then log file will not be rotated (until Daily Maintenance has started).

Resolution

Configure a cron task to rotate logs for affected domain individually:

  1. Editing crontab:

    crontab -e
  2. Create a crontask with similar content:

    01      01,05,10,15,20  *       *       *       /usr/local/psa/logrotate/sbin/logrotate /usr/local/psa/etc/logrotate.d/example.com -s /usr/local/psa/var/logrotate.status

After that log rotation will be performed 5 times a day for the domain 'example.com'.

Have more questions? Submit a request
Please sign in to leave a comment.