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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -