Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websockets: configure default ping interval #557

Open
oliver-sanders opened this issue Feb 16, 2024 · 2 comments · May be fixed by #586
Open

websockets: configure default ping interval #557

oliver-sanders opened this issue Feb 16, 2024 · 2 comments · May be fixed by #586
Assignees
Labels
blocked This work cannot proceed until other work has been completed. small
Milestone

Comments

@oliver-sanders
Copy link
Member

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 oliver-sanders added this to the pending milestone Feb 16, 2024
@oliver-sanders
Copy link
Member Author

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 oliver-sanders modified the milestones: pending, 1.5.0 Mar 14, 2024
oliver-sanders added a commit to oliver-sanders/cylc-uiserver that referenced this issue Apr 23, 2024
* Closes cylc#557
* Sends regular pings to websocket clients to ensure that the connection
  is still active and open at the other end.
* This allows for earlier detection of client-side connection closing.
@oliver-sanders oliver-sanders linked a pull request Apr 23, 2024 that will close this issue
8 tasks
@oliver-sanders oliver-sanders self-assigned this Apr 23, 2024
@oliver-sanders oliver-sanders modified the milestones: 1.5.0, 1.6.0 Apr 30, 2024
@oliver-sanders oliver-sanders added the blocked This work cannot proceed until other work has been completed. label Apr 30, 2024
@oliver-sanders
Copy link
Member Author

Blocked by tornadoweb/tornado#3258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This work cannot proceed until other work has been completed. small
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant