Nginx proxy hangs in a while when idle Nginx proxy hangs in a while when idle nginx nginx

Nginx proxy hangs in a while when idle


I found the problem. By checking nginx error log and a bit a hackery sniff and guess, I found out that the web socket connections usually disconnect and reconnect (mobile devices) and the nginx peer tries to keep the connection alive, and then maximum connection limit reaches. I just decreased timeouts and increased max connections.