Nginx proxy_intercept_errors

Kiril Kalchev kirilk at cloudxcel.com
Wed Mar 6 14:02:30 UTC 2013


Is there any way to force nginx to read request body? I really don't care about this overhead, I hit connection limit much more faster. Thank you for the super fast answer.

Regards,
Kiril

On Mar 6, 2013, at 3:54 PM, Maxim Dounin wrote:

> Hello!
> 
> On Wed, Mar 06, 2013 at 03:44:37PM +0200, Kiril Kalchev wrote:
> 
>> I have noticed that when I set 'proxy_intercept_errors on;'  in 
>> my nginx config it kills tcp connection to the origin server if 
>> it returns 4xx or 5xx?
>> This is my example config to reproduce the 
>> situation(https://gist.github.com/kirilkalchev/5098882).  I am 
>> in a situation where my backend server returns only 403 and 404 
>> (it is some kind of home made authentication system 403 means go 
>> away 404 means continue) and I need to display different things 
>> in this cases, but without keep alive connections to the backend 
>> are exhausted pretty fast.
> 
> With proxy_intercept_errors nginx doesn't read the response body 
> if a response returned is the error, and the upstream connection 
> can't be kept alive due to this (unless there is no body and it's 
> known after reading response headers).
> 
> -- 
> Maxim Dounin
> http://nginx.org/en/donation.html
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3565 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130306/c78e5ee7/attachment.bin>


More information about the nginx mailing list