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

Kernel is not restarted with new ports if the kernel dies after the polling is started #347

Open
skukhtichev opened this issue Jan 31, 2018 · 0 comments

Comments

@skukhtichev
Copy link

There is a logic in Jupyter Client for restarting kernels with new ports when the kernel process dies during initial kernel startup.

When the kernel is restarted with new ports a client (Jupyter Notebook, Kernel Gateway, etc.) is not notified that kernel was restarted with new ports. Killing kernel process during initial kernel startup showed that kernel_manager.is_alive() returns False, and kernel is restarted with new ports only when _initial_startup parameter equals True. _initial_startup variable equals True only in the case when the kernel process is died before poll function of the KernelRestarter class is executed. If the kernel process dies after the polling is started (kernel_manager.is_alive() == True), then ports will not be refreshed. As a result the kernel is restarted with the same ports.

Even if the kernel will be restarted with new ports then ZMQChannelsHandler of the Notebook server could connect to the new ports only within timeout defined in kernel_info_timeout (before create_stream() function of Notebook's ZMQChannelsHandler is executed). If the kernel is restarted with new ports after kernel_info_timeout (stream is created) then the Notebook server will be notified that kernel was restarted, but new stream will not be created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant