• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Log Rotate Doesn't Rotate

Ed_Greenberg

New Pleskian
I have a Plesk 12 installation that is not rotating logs.

What I've done
* Turned on Log rotation for the proper domain. I set it to rotate daily, so there was no issue regarding file size.

* Checked for a correct file in /usr/local/psa/etc/logrotate.d

* Ran /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php as root from the command line.

Any further suggestions?

Thanks,

Ed Greenberg
 
Hello Ed,

Welcome to the forums. Another possible diagnostic step you can take is to run the logrotate utility manually for a single domain. I would recommend setting the log rotation condition to "By size", as it is less ambiguous than "By time". Set the threshold really low (say, 4 KB), generate some hits to ensure that the access_log file exceeds the value you set, then run the following commands:

/usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=<your_domain_name_here>

See if it does the trick. The expected result is that a) the contents of the access_log would be merged into the access_log.processed file and b) the access_log.processed file would be rotated as per the log rotation settings. If the former happens, but not the latter, try the following command:

/usr/local/psa/logrotate/sbin/logrotate /usr/local/psa/etc/logrotate.d/<your_domain_name_here>

This one is supposed to rotate the access_log.processed file. If it does not despite the file meeting the log rotation criterion (as set in /usr/local/psa/etc/logrotate.d/<your_domain_name_here>), most likely something is up with the logrotate utility. Check that the permissions on the log files are correct (root:root, 644 for all files except the *.webstat ones), maybe reinstall the psa-logrotate, the usual stuff.

Anyway, these steps should help you narrow the problem down and hopefully find a solution. Once you've figured it out, it would be mighty kind of you to share the root cause and the fix so that other users may benefit from your wisdom )
 
Back
Top