Applicable to:
- Plesk for Linux
Symptoms
-
Plesk never loads or fails with 502 Bad Gateway/504 Gateway errors.
-
One of the following error messages appears in
/var/log/sw-cp-server/error_log
:CONFIG_TEXT: [error] 8074#0: *1046 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 203.0.113.2, server: , request: "GET /login_up.php3 HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock", host: "example.com:8443"
CONFIG_TEXT: [error] 2550#0: *521 recv() failed (104: Connection reset by peer) while reading response header from upstream, client:203.0.113.2, server: , request: "GET /login_up.php3 HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "203.0.113.2:8443"
-
Restarting Plesk services has no effect:
# service sw-cp-server restart && service sw-engine restart
Cause
Plesk services are stuck.
Resolution
-
Connect to the Plesk server via SSH.
-
Stop the
sw-engine
andsw-cp-services
services:# service sw-engine stop && service sw-cp-service stop
-
Find hanged
sw-engine
processes:# ps aux | grep sw-engine
root 23173 0.0 0.3 383796 37504 ? SN 09:19 0:00 /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/plib/DailyMaintainance/script.php
root 30148 0.0 0.3 398044 45916 ? SN 09:20 0:00 /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/plib/DailyMaintainance/task-script.php PleskUsage --period=daily
root 30164 0.0 0.3 391748 38820 ? SN 09:20 0:04 /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/bin/php_handler --list -json true -
Kill all listed above processes using their PID:
# kill -9 23173 30148 30164
-
Start Plesk services:
# service sw-cp-server start && service sw-engine start
-
Open Plesk.
Comments
4 comments
I am having this trouble regularly. Every day at around 6.30 the network and cpu usage spike and the domains stop being served with 504 errors. I restarted both nginx and apache and it didn't work. The only solution I found was to reboot the server, but the next morning it stops again. Tomorrow I'l ll try the solution above.
It seems to have started after the upgrade to 18.0.27. I'm running plesk obsydian on linux.
I began to suspected ddos attacks, but I checked the main ips and there was nothing suspicious. Could it be some maintainence script causing that?
This is the error I got (8:13 was the time I checked the domains=.
2020/06/08 08:13:15 [crit] 599#0: *1 connect() to unix:/run/plesk-web-socket/ws.sock failed (2: No such file or directory) while connecting to upstream, client:x.x.x.x, server: , request: "GET /ws HTTP/1.1", upstream: "http://unix:/run/plesk-web-socket/ws.sock:/", host: "canpujades.com:8443"
2020/06/08 08:13:18 [crit] 599#0: *3 connect() to unix:/run/plesk-web-socket/ws.sock failed (2: No such file or directory) while connecting to upstream, client: x.x.x.x, server: , request: "GET /ws HTTP/1.1", upstream: "http://unix:/run/plesk-web-socket/ws.sock:/", host: "canpujades.com:8443"
2020/06/08 08:13:25 [crit] 599#0: *6 connect() to unix:/run/plesk-web-socket/ws.sock failed (2: No such file or directory) while connecting to upstream, client: x.x.x.x, server: , request: "GET /ws HTTP/1.1", upstream: "http://unix:/run/plesk-web-socket/ws.sock:/", host: "canpujades.com:8443"
I tried the solution above and it didn't work. The only solution was to reboot the machine.
@bruno vianna,
The issue may be caused by various of reasons.
I'd recommend contacting our Support Team for a thorough investigation.
It's not a solution...not solving the reason of the problem.
Please sign in to leave a comment.