Open stevehaertel opened 3 years ago
Hi @stevehaertel,
This issue makes sense because kernels culled on the EG server are not detected as culled until their consumer goes to perform another operation. I'd be curious if you see this behavior using lab because lab tends to monitor kernels more closely/frequently than the notebook front-end.
Rather than just check the length of the kernel manager (which is really the MappingKernelManager), I suspect if that was changed to call self.kernel_manager.list_kernels()
, then check that result against zero, this may resolve the issue since, when gateway is configured, this will hit the EG server to refresh the list.
Describe the bug
notebook
+jupyter_enterprise_gateway
environment does not respect shutdown_no_activity_timeout if kernel culling is turned on.To Reproduce Steps to reproduce the behavior:
Set up your notebook config.py file with the important parts:
Start Jupyter and JEG with culling and no_activity_timeout setup, for example, in this way:
Launch your NB, and start a kernel
Logout from the notebook page where you are (I didn't go back to the main page to log out. Not sure if that matters)
Wait until your kernel gets culled successfully. (e.g., watch the output of
ps -ef | grep jupyter
)Expected behavior After the kernel is culled, the jupyter process should be shut down after one more interval of
shutdown_no_activity_timeout
, but it is not.Desktop (please complete the following information):
notebook
version 6.3.0 +jupyter_enterprise_gateway
version 2.5.0Additional context
notebookapp.py
's knowledge of how many kernels are running.notebookapp.py
thinks that there are still running kernels until the user refreshes its memory by doing the above-mentioned login: