I am trying to install a proxy server in websocket upstream with nginx 1.9.11. Here is the configuration excerpt:
upstream autocloud_dispatcher {
server 127.0.0.1:4000 fail_timeout=0;
}
server {
.....
location /ws {
proxy_pass http://autocloud_dispatcher;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
}
}
In addition, I send ping messages from the backup every 90 seconds. But the connection still disconnects every 2 minutes. Some other setup in nginx that defaults to 120s?
source
share