Applicable to:
- Plesk for Linux
Symptoms
-
The
sw-engine
process causes high CPU usage:# ps aux | grep sw-engine
root 1242 0.0 0.3 348136 28732 ? Ss Jan14 0:14 /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/bin/modules/watchdog/wdcollect -c /usr/local/psa/etc/modules/watchdog/wdcollect.inc.php
root 2315 0.0 0.1 353260 9908 ? Ss Jan14 0:00 sw-engine-fpm: master process (/etc/sw-engine/sw-engine-fpm.conf)
root 3136 0.0 0.3 363840 32028 ? S Jan14 1:00 /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/lib64/plesk-9.0/psa-health-monitor-notification.php -
Plesk may fail to load with a 502 error.
Cause
Some sw-engine
child processes are stuck and cannot be stopped normally.
Resolution
-
Connect to the Plesk server via SSH.
-
Stop the
sw-engine
service:# service sw-engine stop
Stopping sw-engine-fpm: [ OK ] -
Find stuck sw-engine processes and their PID:
# ps aux | grep sw-engine
psaadm 1597 0.0 2.1 274896 44100 ? Ss 12:39 0:00 /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/plib/WebSocket/bin/ws-server.php
psaadm 1842 0.0 2.3 278952 49564 ? S 12:42 0:00 /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/bin/extension --exec revisium-antivirus ra_executor.php -
Kill these stuck processes using their PID. In the example above, they are 1597 and 1842:
# kill -9 1597 1842
-
Start the
sw-engine
service:# service sw-engine start
Starting sw-engine-fpm: [ OK ]
Comments
3 comments
Hello, this error caused my CPU to be at 100%, and I cannot log in to the Plesk control panel. Following this method is still ineffective, and even after starting sw-engine, the usage rate is still very high. Can you tell me how to fix it?
Hello, I have the same issue. Yesterday my VPS gets 100% CPU usage caused by mariadb and sw-engine. I tried the above solution, but when I start sw-engine I got 100% CPU usage again. I tried this couple of times and every time I stopped sw-engine, there was same stuck processes. After a couple of hours (may be 3 or more), the problem gone and CPU usage was back to normal. This morning exactly same issue. And again after 2 and a half hours it's back to normal.
Please take care of this problem, or tell some workaround. Obviously it's not an isolated case. I can provide logs or whatever you need. My VPS is:
8vCPU, 16GB RAM, 400GB SSD, Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-87-generic x86_64)
Does not help. New swengine processes start again and again and the high CPU usage remains.
Uninstalling the "Log Browser" extension has helped me. The extension probably massively searches the e-mail logs.
Please sign in to leave a comment.