Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increasing 504 timeout error

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

like image 719
Matthew Jones Avatar asked May 29 '12 21:05

Matthew Jones


People also ask

Is 504 Gateway Timeout my fault?

Causes of the 504 Gateway Timeout Error The 504 Gateway error is usually temporary, and different reasons may cause it. Most often than not, the problem is due to a client-end issue like Internet connection troubles. However, the hitch may be due to server-to-server network connectivity issues or a server being down.

Why do I keep getting error 504?

A 504 Gateway Timeout error indicates that the web server is waiting too long to respond from another server and “timing out.” There can be many reasons for this timeout: the other server is not functioning properly, overloaded, or down.

How do I increase my gateway timeout?

For example, you want to increase request timeout to 300 seconds. Then you need to add proxy_read_timeout, proxy_connect_timeout, proxy_send_timeout directives to http or server block. Here the http block allows the changes in all server in NGINX.


1 Answers

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

like image 123
kworr Avatar answered Oct 06 '22 00:10

kworr