365 Hosting support | Server Management Provider

365hostingsupport ultimate source of Server Security, cPanel server management and monitoring. Since 2012 we are offering top class technical support services at lowest prices. We offer 100% Satisfaction with 7 Days Money Back Guarantee.

365 Hosting support |  Server Management Provider - 365hostingsupport ultimate source of Server Security, cPanel server management and monitoring. Since 2012 we are offering top class technical support services at lowest prices. We offer 100% Satisfaction with 7 Days Money Back Guarantee.

Nginx 504 error: Gateway Timeout upstream timed out (110: Connection timed out)

Nginx 504 error: Gateway timeout upstream timed out (110: Connection timed out)

Error :

Nginx 504 Gateway timeout

Nginx 504 Gateway timeout

upstream timed out (110: Connection timed out) while reading response header from upstream
nginx 504 error: Gateway Timeout

 

  • Nginx + plesk
  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux

Plesk Error log path :

“/var/www/vhosts/example.com/logs”

In NGINX plain server it should log to a pre-defined location which is often /var/log or /var/log/nginx

 

2016/03/15 12:32:13 [error] 12499#0: *5045889 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 123.123.123.123, server: my.domain.com, request: “GET /index.php HTTP/1.0”, upstream: “https://123.123.123.123:7081/index.php”, host: “domainname.com”, referrer: “https://domainname.com/client/”

 

This error “nginx 504 error: Gateway Timeout” does often caused due to the issue on the back-end connections which is serving the contents, to fix this we need to figure out what configuration we are using.

 

Fix :

For Nginx as Proxy (php-fpm disabled)

To Fix it for all website hosted on server we will need to change the global settings, check if the file exist on plesk server as “/etc/nginx/conf.d/timeout.conf” if not create it and enter the below values in it.

proxy_connect_timeout       600;
proxy_send_timeout          600;
proxy_read_timeout          600;
send_timeout                600;

If you are not using the Nginx as proxy but Nginx + FastCGI (PHP-FPM enabled) we will need to change the value at “/etc/nginx/nginx.conf” as below

fastcgi_buffers 8 128k;
fastcgi_buffer_size 256k;

Once done Restart ‘php-fpm’, ‘apache’ and ‘nginx’ services.

 

Remember one thing this is base on the studies we implement for our customers if this fix does not apply on your issue you can contact us to permanently solve your issue at   http://365hostingSupport.com