nginx的upstream模块 设置 keepalive 引发的报错?
nginx的server模块的主要配置: upstream模块的主要配置
upstream api.server {
server 192.168.3.16:9097 weight=2;
server 192.168.3.16:9098 weight=2;
server 192.168.3.17:9097 weight=5;
server 192.168.3.17:9098 weight=5;
server 192.168.3.18:9097 weight=9;
server 192.168.3.18:9098 weight=9;
keepalive 30000;
}
查看资料的解释keepalive 的作用是保持与服务端的长连接,从性能角度考虑,需要设置keepalive, 但是线上配置了 keepalive 30000; 确比较频繁的大约十分钟报一次这个错,upstream prematurely closed connection while reading response header from upstream 然后把这个 keepalive 30000; 配置去掉之后,就不报这个错了,有哪位兄台给解释下原因吗?