用openresty(1.19.3.1) 做为负载均衡, 频繁出现这个问题 " 4908#4908: *5 upstream timed out (110: Connection timed out) while reading response header from upstream";
ngx代码:
upstream mm {
server 192.168.1.2:8888 weight=1;
server 192.168.1.1:8888 weight=1;
}
location /mm {
access_by_lua_file /usr/local/openresty/nginx/conf/lua/limit.lua;
proxy_http_version 1.1;
proxy_set_header Connection "keep-alive";
proxy_set_header X-Real-IP $remote_addr;
if (!-f $request_filename) {
proxy_pass http://mm;
}
}