You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 equalsTrue
._initial_startup
variable equalsTrue
only in the case when the kernel process is died beforepoll
function of theKernelRestarter
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 inkernel_info_timeout
(beforecreate_stream()
function of Notebook'sZMQChannelsHandler
is executed). If the kernel is restarted with new ports afterkernel_info_timeout
(stream is created) then the Notebook server will be notified that kernel was restarted, but new stream will not be created.The text was updated successfully, but these errors were encountered: