When a Customer and Business manager tasks run too long, I am getting either a 503 or 504 error from nginx.
The following errors are shown in the
2014/03/24 17:00:01 [error] 22740#0: *204041 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 127.0.0.1, server: , request: "POST /plesk-billing/task-manager.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "localhost:8443"
There are a lot of objects registered in billing. Task in billing runs long because of large data to be processed.
Since version 11.5 Plesk Control Panel itself works on Nginx + php-fpm:
sw-cp-server - Plesk Control Panel server based on Nginx. sw-engine - Plesk Control Panel engine based on php-fpm
You have to increase timeouts in order to fix the isuse, it is needed to adjust the following settings:
request_terminate_timeout = 600s
If you want to track slow queries, you can enable thie logging by uncommeting the following:
;slowlog = /var/log/sw-cp-server/slow.log ;request_slowlog_timeout = 10s
Increase the following variables in the
fastcgi_read_timeout 600; fastcgi_send_timeout 600;
and increaser buffers:
fastcgi_buffers 8 128k; fastcgi_buffer_size 256k;
Restart Plesk services:
/etc/init.d/sw-cp-server restart /etc/init.d/sw-engine restart