Applicable to:
- Plesk Onyx for Linux
- Plesk for Linux
Question
Why does logrotation not work in Plesk?
Log rotation condition at Domains > example.com > Websites & Domains > Logs > Manage Log Files > Log Rotation is "By size".
There are some logs with exceeded size limit.
Answer
When such situation happens, it does not necessarily mean that log rotation does not work correctly. The log rotation is triggered by the Daily Maintenance script and it may not have run yet.
If the log rotation condition is set to "By size", Plesk rotates logs when their size exceeds particular limit. So if the size of log file exceeds the limit but that log file is not rotated, the Daily Maintenance is not started yet.
Steps to check the script start time can be found here.
In order to make Plesk execute log rotation task more often refer to the this article.
Comments
2 comments
How do I know that `Daily Maintenance script` is working?
my current log rotation configuration: http://prntscr.com/fspwvm
Though I have set it to 3 kb the log file size is 3.9 GB.
What am I missing?
Thank you in advance :)
@Esha, There is a possibility that web statistics is not calculated for the domain and therefore log rotation does not take place. Please, try to run `/usr/local/psa/admin/bin/web_statistic_executor --calculate-domain example.com` specifying the domain in question, I think you will see exact error message why statistics is not calculated. Then, try to search for a KB article with a solution in our Help Centre.
Please sign in to leave a comment.