4

I have a Rails+Phusion Passenger set-up. Sometimes, the user query that Nginx is proxying to Passenger/Rails times out. How can we set Nginx such that after keepalive_timeout, Nginx does NOT retry but rather just reports the error - likely a 502 - and just keep going on rather than re-trying the 'bad' controller/action again and again

2
  proxy_read_timeout 600;
      proxy_next_upstream off;

Increase the timeout and turn off the upstream retry http://wiki.nginx.org/HttpProxyModule#proxy_next_upstream

The stops the resubmit after 60 seconds but we still find a resubmit after 305 seconds. Don't know why, so we have done this: proxy_read_timeout 600;

To timeout after 5 min and user gets a 504

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.