• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

sw-engine.log file massive and not rotating

websavers

Regular Pleskian
Hey everyone,

We've got a number of servers with Plesk panel, making use of php-fpm and nginx processing. All (or very close to all) of them are running 11.5.30 Update #48.

Just before migrating a few of these servers, I've discovered that the file /var/log/sw-cp-server/sw-engine.log is typically massive (20-50GB) causing IO performance issues and, of course, creating longer than necessary migrations.

We've taken to simply nulling the log file with cat /dev/null > /var/log/sw-cp-server/sw-engine.log, however I don't want to be constantly having to do this on a regular basis. Shouldn't this file be automatically rotating?

Is this a bug in Plesk that the devs forgot to add this file to logrotate?
 
Log rotation parameters for Plesk services are defined in the /usr/local/psa/etc/logrotate.conf configuration file. As you can see file /var/log/sw-cp-server/sw-engine.log is not specified there. Only /var/log/sw-cp-server/error_log. You can try to add rotation for /var/log/sw-cp-server/sw-engine.log there and run daily maintenance script with

# /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php

for checking results.
 
Igor,

That fixed it! I added it to the logrotate.conf file for Plesk and now it's rotating properly. Shouldn't this be there already though? After all, that's a Plesk log file (isn't it?)
 
Back
Top