jupyter / jupyter/notebook

Add Keep-Alive configurable setting for terminal

Open
#1,072 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

I run notebook behind nginx. One problem I have with the terminal function is that nginx will close the websocket connection after 60 seconds. It's clearly not a good solution to make the timeout longer in nginx. Another solution is for the backend periodically send a websocket ping to the web browser when there is no activity.

For this, I just added some code to terminado to support a 'keep_alive_time.' See details here:
https://github.com/takluyver/terminado/commit/1c591faeac3efafe70e34d8b79d90c32d747ad53

Basically if keep_alive_time=x, it means it will send a websocket ping if there is no activity for x seconds. If x is 0, then the ping business is disabled.

What I want is for notebook to expose this setting in the config file, so that people who need them can turn it on.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the notebook terminal websocket configuration and reviewing the linked terminado commit for the keep_alive_time behavior. Expose this setting through the notebook config, with zero disabling pings, and verify that configured terminals send periodic websocket pings when idle.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, nginx
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.