Tornado WebSocket closes once a minute -
i'm using closure client-side , tornado server side. create socket:
this.socket = goog.net.websocket(true)
and open it:
this.socket.open(thesocketurl)
every works fine including messages being passed correctly. however, once per minute (once every 60 61 seconds), socket closes , reopens. there no errors server-side , closure socket error event doesn't called.
i've added logging tornado , seems calling on_connection_close() calls socket's method on_close(). close() method not called.
any idea why might happening?
are using nginx or other reverse-proxy in front of tornado server? i've seen happen when proxy timeout elapses , nginx closes connection, causing behavior you're seeing.
you can change proxy_send_timeout
, proxy_read_timeout
in nginx prevent this. make sure when edit proxy.conf
, include main nginx.conf
.
Comments
Post a Comment