• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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