Jupyter uses websockets to show real time output and pings every 30 seconds to keep the connection alive.
The websocket is proxied though Hospworks which is configured to keep TCP connections idle for 30 second. If the there is no computation running, a small delay (e.g. the thread pump not being immediately scheduled) and the TCP connection backing the websocket from the client to Hopsworks gets closed.
When there is a computation running, the websocket might be dropped for exceeding the HTTP timeout (again 30 seconds) When there is something running the websocket frames flow from the server to the client. The only time there is a frame from the client to the server is during the PING-PONG exchange. As in the case above if there is a small delay in scheduling the thread pumps, the client won't be able to receive the ping and respond with the pong in the 30 seconds window.
This PR will make the tornado webserver to ping more often (by default 10 seconds) so that connection won't be dropped anymore (unless the machine is under heavy load)