3

here is my config :

location / {
    proxy_pass http://localhost:8003/;
    proxy_connect_timeout 3600s;
    send_timeout 3600s;
    proxy_read_timeout 3600s;
    include /etc/nginx/proxy_params;
}

But, I am getting 504 Gateway Timeout error after 1min 30 seconds . But not according to my above configurations, whats the reason ? How can i make it work for more seconds .

user1653509
  • 153
  • 1
  • 3
  • 10

2 Answers2

3

I know OP has probably long moved on from this question, but the timeout settings should be in the server or http block not in the location block. Example:

server {
    proxy_connect_timeout 3600s;
    send_timeout 3600s;
    proxy_read_timeout 3600s;

    location / {
        proxy_pass http://localhost:8003/;
        include /etc/nginx/proxy_params;
    }
}

Sam
  • 571
  • 1
  • 6
  • 18
0

IN CASE there's a NAT gateway between your NGINX instance & the destination (proxy_pass), this answer may help.

snowpeak
  • 797
  • 9
  • 25