Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

  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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.