Article ID: 112543, created on Oct 17, 2011, last review on Mar 23, 2015

  • Applies to:
  • Plesk 10.x for Linux

Symptoms

On the Parallels Plesk Panel server, a mass of sw-engine-cgi processes have been running for days, generating a high load on the server:
 
#ps axww | grep sw-engine-cgi | grep -v grep | wc -l 


All processes have open file descriptors:
 
[root@plesk ~]# ls -la /proc/932068/fd
total 0
dr-x------ 2 psaadm sw-cp-server 0 Jun 28 22:48 .
dr-xr-xr-x 6 psaadm sw-cp-server 0 Jun 26 08:57 ..
lrwx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 0 -> socket:[10293586]
l-wx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 1 -> /dev/null
l-wx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 2 -> /var/log/sw-cp-server/error_log
lrwx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 3 -> (deleted)/tmp/sw-engine-fcgi-accept-stamp.RpsxL0
[root@plesk ~]# ls -la /proc/932091/fd
total 0
dr-x------ 2 psaadm sw-cp-server 0 Jun 28 22:48 .
dr-xr-xr-x 6 psaadm sw-cp-server 0 Jun 26 08:56 ..
lrwx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 0 -> socket:[10293586]
l-wx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 1 -> /dev/null
l-wx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 2 -> /var/log/sw-cp-server/error_log
lrwx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 3 -> (deleted)/tmp/sw-engine-fcgi-accept-stamp.RpsxL0
lr-x------ 1 psaadm sw-cp-server 64 Jun 28 22:48 8 -> /dev/urandom
[root@plesk ~]# ls -la /proc/932090/fd
total 0
dr-x------ 2 psaadm sw-cp-server 0 Jun 28 22:48 .
dr-xr-xr-x 6 psaadm sw-cp-server 0 Jun 26 08:56 ..
lrwx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 0 -> socket:[10293586]
l-wx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 1 -> /dev/null
l-wx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 2 -> /var/log/sw-cp-server/error_log
lrwx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 3 -> (deleted)/tmp/sw-engine-fcgi-accept-stamp.RpsxL0
lr-x------ 1 psaadm sw-cp-server 64 Jun 28 22:48 6 -> /dev/urandom
[root@plesk ~]# ls -la /proc/932092/fd
total 0
dr-x------ 2 psaadm sw-cp-server 0 Jun 28 22:48 .
dr-xr-xr-x 6 psaadm sw-cp-server 0 Jun 26 08:57 ..
lrwx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 0 -> socket:[10293586]
l-wx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 1 -> /dev/null
l-wx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 2 -> /var/log/sw-cp-server/error_log
lrwx------ 1 psaadm sw-cp-server 64 Jun 28 22:48 3 -> (deleted)/tmp/sw-engine-fcgi-accept-stamp.RpsxL0
lr-x------ 1 psaadm sw-cp-server 64 Jun 28 22:48 6 -> /dev/urandom

Cause

At a certain point, sw-cp-engine loses control over sw-engine-cgi processes and does not kill them when it stops.
After a restart, sw-cp-server raises a new batch of sw-engine-cgi processes, and all engine processes keep running.

Resolution

Use the patch for sw-cp-server located in the /etc/init.d/sw-cp-server folder of the attached archive. This binary has the "killall sw-engine-cgi" directive. Make sure to back up the original file.
Also as possible solution you can try to set value "min-procs" to 1 or 2 in /etc/sw-cp-server/applications.d/plesk.socket.sh and restart psa service after that.

Attachments

dd0611b6086474193d9bf78e2b293040 a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF