• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

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