cylc / cylc-uiserver

A Jupyter Server extension that serves the cylc-ui web application for monitoring and controlling Cylc workflows.
https://cylc.org
GNU General Public License v3.0
15 stars 18 forks source link

websockets: configure default ping interval #557

Open oliver-sanders opened 7 months ago

oliver-sanders commented 7 months ago

Websocket servers can send pings to the client, if the client does not respond within a configured timeout, the server can close the connection.

This helps to identify client disconnects before failed data delivery which can be useful. This can also help to keep the connection looking "alive" from the perspective of proxies, some of which will kill websockets on an idle timeout.

The ability to configure pings was recently added to Jupyter Server (#1391), once this is released we will be able to configure websocket pings.

Suggest being a little generous with the timeout as we know that some blocking requests can take several seconds to be processed (or over 10 seconds in some cases, see #547).

oliver-sanders commented 6 months ago

The Jupyter Server side of this is now release (v2.13.0)

See the config reference for the new ping options:

https://jupyter-server.readthedocs.io/en/latest/other/full-config.html

oliver-sanders commented 5 months ago

Blocked by https://github.com/tornadoweb/tornado/issues/3258