I'm trying to proxy location to websocket upstream with nginx 1.9.11. Here's the config 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;
}
}
Besides that I send ping messages from the backed every 90 seconds. But connection is still getting disconnected every 2 minutes. Some other setting in nginx that defaults to 120s?