Welcome! Log In Create A New Profile

Advanced

Proxy returns 504 then blocks next connections

July 11, 2013 03:55PM
I'm having an issue where I proxy a long running script and receive a 504 error when it exceeds my proxy_read_timeout setting. All of that's behaving normally -- what isn't behaving normally is that the next several requests I make to the domain via the same proxy code also return 504s after timing out, despite the fact that the request should complete properly.

The first script that runs takes approximately 10 minutes to run and, once it completes on the origin, the server again takes connections. The oddest part is that all of this is specific to the web browser calling the pages on the server. If I access the long running script in Chrome, I can no longer access another page through the proxy until the script finishes on the origin. Meanwhile, I can access pages without issue on Firefox or IE. If I run the script through Firefox, it becomes locked out but Chrome and IE work fine.

Here are the relevant proxy lines:

proxy_cache CACHEFOLDER;
proxy_cache_use_stale updating error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_cache_valid 60m;
proxy_redirect off;
proxy_connect_timeout 120;
proxy_send_timeout 120;
proxy_read_timeout 120;
proxy_buffers 8 16k;
proxy_buffer_size 16k;
proxy_busy_buffers_size 64k;
proxy_cache_key $host$request_uri;
proxy_set_header X-Forwarded-For $IP;
proxy_set_header Host $VAR_HOST;
proxy_pass $REQUEST_PROTO://$PROXY_TO;

Has anyone experienced anything like this before? Or is there any setting within NGINX that could be the culprit? The server being proxied is running IIS, but when I run the long running script directly against the proxied server, I'm not getting the same behavior. The long running script runs and I'm able to open a new browser tab and continue browsing as well.
SubjectAuthorPosted

Proxy returns 504 then blocks next connections

abstein2July 11, 2013 03:55PM

Re: Proxy returns 504 then blocks next connections

R1CHJuly 11, 2013 08:17PM

Re: Proxy returns 504 then blocks next connections

abstein2July 15, 2013 12:46AM

Re: Proxy returns 504 then blocks next connections

Maxim DouninJuly 15, 2013 07:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 116
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready