线上nginx的一次“no live upstreams while connecting to upstream ”分析
先描述一下环境,前段的负载均衡转发给nginx,nginx再转发给后端的应用服务器。 nginx配置文件如下: upstream ads { server ap1:8888 max_fails=1 fail_timeout=60s; server ap2:8888 max_fails=1 fail_timeout=60s; } 出现的现象是: 日志里面每隔一两分钟就会记录一条类似 *379803415 no live upstreams while connecting to upstream 的日志, 此外,还有大量的“upstream prematurely closed connection while…