Proxy Retry Logic

Sirsiwal, Umesh usirsiwal at
Thu Dec 23 05:50:23 MSK 2010

I just tried using error_pages and have my post_subrequest return the error code as Maxim had suggested.

That works very well. The only oddity is that I get two post_subrequest callback for a single subrequest. That is something I can handle my module. 

Thanks for your help.

From: Eugaia [ngx.eugaia at]
Sent: Wednesday, December 22, 2010 9:36 PM
To: nginx-devel at
Subject: Re: Proxy Retry Logic


On 23/12/2010 04:25, Sirsiwal, Umesh wrote:
> 0/12/22 20:48:52 [debug] 1637#0: *3 try to use file: "@sub2" "/Users/umesh/nginx/install/html at sub2"
> At least according to this e-mail,28297 chain, it seems I cannot use named locations in try_files directory except as the last location.
Yes.  Sorry - forgot.

How about returning different status codes from your proxies instead,
then have various error_page  434 = @named declarations?  You'll
probably need to have recursive_error_pages
( on to work

I think error pages can be defined with non-standard error codes.


nginx-devel mailing list
nginx-devel at

More information about the nginx-devel mailing list