Article ID: 120210, created on Feb 18, 2014, last review on Jun 1, 2016

  • Applies to:
  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux


Multiple '504 errors' are shown on SSL pages or it takes a lot of time to load the website page. This can be fixed by restarting the 'apache' service, but the problem reoccurs.

In domain logs /var/www/vhosts/ the following error can be found:

2013/11/15 03:32:13 [error] 12699#0: *5042589 upstream timed out (110: Connection timed out) while reading response header from upstream, client:, server:, request: "GET /wp-login.php HTTP/1.0", upstream: "", host: "", referrer: "" 


Timeout error is often caused by issues on the backend connection that is serving the content. To fix this, first, you have to figure out what configuration you are using.


For Nginx as Proxy (php-fpm disabled)

  • To apply settings globally, increase the timeout values by creating the file /etc/nginx/conf.d/timeout.conf and restarting 'nginx' service:

    # cat /etc/nginx/conf.d/timeout.conf

    proxy_connect_timeout       600;
    proxy_send_timeout          600;
    proxy_read_timeout          600;
    send_timeout                600;
  • To increase timeout settings for a particular domain, add the lines mentioned above to 'Additional Nginx directives' at:

    Plesk > Subscriptions > > Websites & Domains > > Apache & nginx Settings

For Nginx + FastCGI (php-fpm enabled)

  • Increase the value of max_execution_time directive (by choosing the value from the drop-down menu or by setting it manually) at:

    Plesk > Subscriptions > > Websites & Domains > > PHP Settings

  • Add fastcgi_read_timeout 300 directive inside the 'nginx' virtual host configuration at:

    Plesk > Subscriptions > > Websites & Domains > > Apache & nginx Settings > Additional Nginx directives

  • Add/increase the following values in the 'http' section in the /etc/nginx/nginx.conf file:

    fastcgi_buffers 8 128k;
    fastcgi_buffer_size 256k;

    Restart 'php-fpm', 'apache' and 'nginx' services.

Search Words

Gateway Timout nginx webmail

Connection reset by peer: mod_fcgid: error reading data from FastCGI server


plesk enctypted data

upstream timed out

nginx time out

504 bad gateway

504 Gateway Timeout


504 Gateway time-out

110: Connection timed out

Nginx 504 Timeout error

website not avilable


sw-engine fastcgi timed out

504 Gateway Time-out nginx

code: 0 Can not restart web server plesk

502 bad gateway

504 gateway error

ERR [panel] Apache config (14476896330.04296200) generatio n failed: Template_Exception: Can not restart web server:




504 Gateway Time-out

nginx reset by peer

504 Gateway Time-out - nginx

504 gateway timeout php


[2015-11-16 17:00:44] ERR [panel] Apache config (14476896330.04296200) generatio n failed: Template_Exception: Can not restart web server:

http errors


a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c 01bc4c8cf5b7f01f815a7ada004154a2 29d1e90fd304f01e6420fbe60f66f838 0a53c5a9ca65a74d37ef5c5eaeb55d7f aea4cd7bfd353ad7a1341a257ad4724a 2a5151f57629129e26ff206d171fbb5f e335d9adf7edffca6a8af8039031a4c7 742559b1631652fadd74764ae8be475e

Email subscription for changes to this article
Save as PDF