Increasing 504 timeout error

fastcgi, gateway, nginx, timeout

Solution

Depending on the kind of gateway you have you should use something like:

proxy_read_timeout 600s;

Check docs: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout

Problem

Is there any way I can make the error 504 gateway timeout longer if so how and where is the file to change it located. I am using nginx on centos 6

Original source