hi£º<div>now i am looking for a 50x retry method, config like this:</div><div><div><br></div><div> </div><div><div><br></div><div> <span class="Apple-tab-span" style="white-space:pre"> </span> upstream jboss8080 {</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> server <a href="http://10.1.2.164:8080">10.1.2.164:8080</a> weight=1 max_fails=1 fail_timeout=2s;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> server <a href="http://10.1.2.174:8080">10.1.2.174:8080</a> weight=1 max_fails=1 fail_timeout=2s;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> server <a href="http://10.1.2.209:8080">10.1.2.209:8080</a> weight=1 max_fails=1 fail_timeout=2s;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> server <a href="http://10.1.7.136:8080">10.1.7.136:8080</a> weight=1 max_fails=1 fail_timeout=2s;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> server <a href="http://10.1.7.137:8080">10.1.7.137:8080</a> weight=1 max_fails=1 fail_timeout=2s;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> server <a href="http://10.1.7.138:8080">10.1.7.138:8080</a> weight=1 max_fails=1 fail_timeout=2s;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> }</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span> server {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>........</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> location / {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>proxy_next_upstream http_500 http_502 http_503 http_504 timeout error invalid_header; </div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>.......</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if ( !-f $request_filename ) {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>proxy_pass <a href="http://jboss8080">http://jboss8080</a>;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>break;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> }</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> }</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span> error_page 500 502 503 504 /50x.html;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> location = /50x.html {</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> root html;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> }</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> }</div>
</div><div><br></div><div><br></div><div>then how proxy_next_upstream control retry times.</div><div><br></div><div><br></div><div>by the way, i used error_page, config like this:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>upstream backend {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> server localhost:8080 weight=5;</div><div>
<span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>upstream backup1 {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> server localhost:8081 weight=5;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>upstream backup2 {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> server localhost:8082 weight=5;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span> server {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>listen 80;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>server_name localhost;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>proxy_intercept_errors on;</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>location / {</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> error_page 502 @backup1;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> proxy_pass <a href="http://backend">http://backend</a>;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>location @backup1 {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> error_page 502 @backup2;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span> proxy_pass <a href="http://backup1">http://backup1</a>;<span class="Apple-tab-span" style="white-space:pre"> </span> </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>location @backup2 {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> proxy_pass <a href="http://backup2">http://backup2</a>;<span class="Apple-tab-span" style="white-space:pre"> </span> </div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> }</div></div><div><br></div><div>@backup1works, but @backup2 doesn't.</div>
<div>how can i let backup2 works.</div><div><br></div><div><br></div><div>
</div></div>