[alibaba/tengine]proxy_next_upstream有时候失效

2024-05-15 718 views
4
Question

版本2.3.0,经常发现proxy_next_upstream有时候失效,后端挂掉或者报500大部分情况都能转到下一台后端,但是有时候只看到access log里面upstream只有一台后端的ip,而且响应码是502. 配置如下: proxy_next_upstream error timeout http_500 http_502 http_503 http_504 non_idempotent proxy_upstream_tries 4;

回答

9

在upstream 里 配置个 max_fails=0; 试下

9

调这个参数是因为怀疑当时upstream机器全挂了吗,当时upstream剩余机器都是正常的