Nginx 504 error: Gateway timeout upstream timed out (110: Connection timed out)
upstream timed out (110: Connection timed out) while reading response header from upstream nginx 504 error: Gateway Timeout
Plesk Error log path :
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: 126.96.36.199, server: my.domain.com, request: “GET /index.php HTTP/1.0”, upstream: “https://188.8.131.52: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.
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