Nginx An existing connection was forcibly closed by the remote host
在用nginx并发100次请求nginx里面的TCP时候提示An existing connection was forcibly closed by the remote host
error.log文件如下
2017/10/24 10:18:11 [error] 8492#16524: *581304 WSARecv() failed (10054: An existing connection was forcibly closed by the remote host) while proxying connection, client: 101.457.149.558, server: 0.0.0.0:3540, upstream: "114.55.149.170:5672", bytes from/to client:0/0, bytes from/to upstream:0/0
nginx Tcp配置如下
stream {
upstream rabbitmq{
server 114.55.149.170:5672;
server 114.55.149.171:5672;
}
server {
listen 3540;
proxy_connect_timeout 600s;
#proxy_timeout 3s;
proxy_pass rabbitmq;
}
}
想到可能是并发下nginx有限制,但是stream里面好像没办法添加keepalive_requests来设置并发数,请问如何解决?