<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">Hi!</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">I think you should paste this issue to the openresty mail list <a href="https://groups.google.com/forum/#!forum/openresty-en">https://groups.google.com/forum/#!forum/openresty-en</a> </div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">For this problem, have you configured any error_page directives? the error_page will trigger an internal redirect.</div> <br> <div id="bloop_sign_1512357825014112000" class="bloop_sign"></div> <br><p class="airmail_on">On 1 December 2017 at 21:10:12, <a href="mailto:tongshushan@migu.cn">tongshushan@migu.cn</a> (<a href="mailto:tongshushan@migu.cn">tongshushan@migu.cn</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>
<title></title>
<div><span>the nginx.conf as below:<br>
<br>
upstream my_server {<br>
<span style="color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
</span>server localhost:8095;<br>
<span style="color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
</span>keepalive 2000;<br>
}<br>
<br>
location /private/rush2purchase/ {<br>
<span style="color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
</span>limit_conn addr 20;<br>
<span style="color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
</span>proxy_pass <a href="http://my_server/private/rush2purchase/">http://my_server/private/rush2purchase/</a>;<br>
<span style="color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
</span>proxy_set_header Host $host:$server_port;<br>
<span style="color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
</span>rewrite_by_lua_file D:/tmp/lua/draw_r.lua;<br>
<span style="color:rgb(0,0,0);background-color:rgba(0,0,0,0)">
</span><font color="#003366"><b>log_by_lua_file</b> </font>D:/tmp/lua/draw_decr.lua;<br>
}</span></div>
<div><span><br>
when I send request to </span><a href="http://localhost/private/rush2purchase/" style="font-size:10.5pt;line-height:1.5;background-color:window">http://localhost/private/rush2purchase/</a><span style="font-size:10.5pt;line-height:1.5;background-color:window"> </span><span style="font-size:10.5pt;line-height:1.5;background-color:window"> ,it works fine the the stream server is up,</span></div>
<div><span>but when I shutdown the upstream server</span><span style="font-size:10.5pt;line-height:1.5;background-color:window">(port:8095)</span><span style="font-size:10.5pt;line-height:1.5;background-color:window">,I find the code not executed in <b><font color="#003366">log_by_lua_file </font></b>(draw_decr.lua).</span></div>
<div><span style="font-size:10.5pt;line-height:1.5;background-color:window"><br>
</span></div>
<div><b>info in nginx access.log:</b></div>
<div><span>127.0.0.1 - - [01/Dec/2017:21:03:20 +0800] "GET /private/rush2purchase/ HTTP/1.1" <b><font color="#FF0000">504 </font></b>558 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3236.0 Safari/537.36"<br>
</span></div>
<div><span style="font-size:10.5pt;line-height:1.5;background-color:window"><br>
</span></div>
<div><b><span style="font-size:10.5pt;line-height:1.5;background-color:window">error
message in </span><span style="font-size:10.5pt;line-height:1.5;background-color:window">nginx</span><span style="font-size:10.5pt;line-height:1.5;background-color:window"> </span><span style="font-size:10.5pt;line-height:1.5;background-color:window">error.log</span><span style="font-size:10.5pt;line-height:1.5;background-color:window">:</span></b></div>
<div><span>2017/12/01 21:02:20 [error] 35292#42868: *3298 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /private/rush2purchase/ HTTP/1.1", upstream: "http://[::1]:8095/private/rush2purchase/", host: "localhost"<br>
2017/12/01 21:03:20 [error] 35292#42868: *3298 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /private/rush2purchase/ HTTP/1.1", upstream: "<a href="http://127.0.0.1:8095/private/rush2purchase/">http://127.0.0.1:8095/private/rush2purchase/</a>", host: "localhost"<br>
</span></div>
<div><span><br></span></div>
<div><span style="font-size:10.5pt;line-height:1.5;background-color:window">How
to fix it?</span></div>
<div><br></div>
<div><br></div>
<hr style="width:210px;height:1px" color="#B5C4DF" size="1" align="left">
<div>
<div style="margin:10px">
<p style="margin:3.75pt 0cm;line-height:21px">
<span style="font-size:12px"><font face="微软雅黑, sans-serif">Tong</font></span></p>
</div>
</div>
_______________________________________________
<br>nginx mailing list
<br><a href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<br><a href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></div></div></span></blockquote></body></html>