Welcome! Log In Create A New Profile

Advanced

nginx proxy "504 Gateway Time-Out"

July 21, 2009 02:48PM
Hi!

I'm trying to proxy a location to a backend COMET server. The COMET server holds long connections, and as such, I need nginx to proxy the connection indefinitely.

However, I always get a "504 Gateway Time-Out" after about a minute. Does anyone know why? Help would be greatly appreciated.

Here's my site conf:

[code]
upstream comet {
server 127.0.0.1:8000;
}

location /comet_long_polling {
# passes the request to node.js
proxy_pass http://comet;
break;

}

[/code]

Here's my proxy.conf:

[code]
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 6000;
proxy_send_timeout 6000;
proxy_read_timeout 6000;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
send_timeout 6000;
proxy_buffering off;

[/code]


Thanks,
Chris
Subject Author Posted

nginx proxy "504 Gateway Time-Out"

chrisnx July 21, 2009 02:48PM

Re: nginx proxy "504 Gateway Time-Out"

Maxim Dounin July 21, 2009 03:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 59
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready