• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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