Need help: websocket proxy stops working after a while

phil3361 nginx-forum at
Fri Apr 4 08:20:04 UTC 2014

Hi all,

The WebSocket protocol specification (RFC 6455) defines a _protocol_level_
keep alive fonctionnality (the protocol defines both a 'ping' and a 'pong'

Unfortunately, it seems that nginx doesn't take these frames into account to
reset its timeout watchdog timer so far... so that you have to implement
some _application_level_ heartbeat mecanism if you don't want your WebSocket
connection be broken by an intermediate nginx on low activity periods...

This is ennoying: such application work has a quite heavy resource cost,
especially on the server side. This looses some of the most valuable
benefits of a WebSocket connection: maintaining an active asynchronous
notification channel from the server to the client, just in case...

Hope this helps,

Posted at Nginx Forum:,239809,248984#msg-248984

More information about the nginx mailing list