Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

proxied request hang when DNS server down (no replies)

$
0
0
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@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>