nginx报: [error] 35171#0: *35 no live upstreams while connecting to upstream, client
程序员文章站
2022-07-15 12:55:24
...
nginx报错:“[error] 35171#0: *35 no live upstreams while connecting to upstream, client: 114.241.109.14, server: jiangxinyanyi.com, request: “GET /admin/index HTTP/1.1”, upstream: “https://www.jiangxinyanyi.com/admin/index”, host: “www.jiangxinyanyi.com””
问题: no live upstreams while connecting to upstream
错误方式:
upstream tomcat1{
ip_hash;
server 39.106.21.243:80;
server 39.106.4.96:80;
}
解决方式:
upstream tomcat1{
ip_hash;
server 39.106.21.243:80 max_fails=5 fail_timeout=60s; #为5秒,不要改为1秒
server 39.106.4.96:80 max_fails=5 fail_timeout=60s;
}