Article ID: 120707, created on Mar 25, 2014, last review on May 11, 2014

  • Applies to:
  • Plesk 11.5 for Linux


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 /var/log/sw-cp-server/error_log:

2014/03/24 17:00:01 [error] 22740#0: *204041 recv() failed (104: Connection reset by peer) while reading response header from upstream, client:, 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:

  1. Increase request_terminate_timeout in /etc/sw-engine/pool.d/plesk.conf:

    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
  2. Increase the following variables in the /etc/sw-cp-server/config file:

    fastcgi_read_timeout 600;
    fastcgi_send_timeout 600;

    and increaser buffers:

    fastcgi_buffers 8 128k;
    fastcgi_buffer_size 256k;
  3. Restart Plesk services:

    /etc/init.d/sw-cp-server restart
    /etc/init.d/sw-engine restart

Search Words

POST /plesk-billing/task-manager.php

104: Connection reset by peer)

a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c 01bc4c8cf5b7f01f815a7ada004154a2 29d1e90fd304f01e6420fbe60f66f838 0a53c5a9ca65a74d37ef5c5eaeb55d7f

Email subscription for changes to this article
Save as PDF