proxied request hang when DNS server down
ywsample
ywsample at gmail.com
Wed Aug 20 07:33:10 UTC 2014
thanks
but I think nginx should not always pending requests and retry dns
forever。and inconsistent response to the first request and follow requests
is also a problem. either all as a timeout processing, either all waiting
dns response
may be nginx need change this behavior
2014-08-20 14:41 GMT+08:00 SmallAnt <unixant at gmail.com>:
> this module can help you !
> HttpUpstreamJdomainModule, http://wiki.nginx.org/HttpUpstreamJdomainModule
> .
>
> It buffers the latest IPs of the host,even local dns server down, nginx
> will work well.
>
>
> On Tue, Aug 19, 2014 at 1:43 PM, ywsample <ywsample at gmail.com> wrote:
>
>> http {
>> resolver 127.0.0.1;
>> resolver_timeout 1s;
>> server {
>> listen 8000;
>> location /test {
>> proxy_pass http://$arg_host:8080;
>> }
>> }
>> server {
>> listen 8080;
>> .......
>> }
>> }
>> ps: other configure is normal
>>
>> I have recently discoverd that when DNS server down, the first proxy
>> request return 504 and than the follow proxy request may hang forever.
>> I use two curl simulate concurrent requests
>>
>> I found than the first request timeout in 1 second and exit, also it
>> delete the timeout timer. because another request waiting dns response, so
>> nginx retry send dns query, but dns never response(because it down), it
>> lead to the follow request hang and also no timer relate to it;
>>
>> PS:base on nginx-1.7.4
>> --
>> ywsample :)
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx at nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
--
ywsample :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140820/ac22ffdb/attachment-0001.html>
More information about the nginx
mailing list