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
Culling runs independently of a kernel's startup and uses the corresponding kernel manager's last_activity attribute to help determine if it should be culled or not. However, because the last_activity attribute is added to the kernel manager instance dynamically, there's a small (typically < 10ms) window where the culler sees that the KernelManager instance exists sans its last_activity attribute. This can result in the following error on the console:
[E 2020-04-07 16:15:08.965 EnterpriseGatewayApp] The following exception was encountered while checking the idle duration of kernel 0070571c-4f92-4027-b9e1-1f98cf62421d: 'RemoteKernelManager' object has no attribute 'last_activity'
Traceback (most recent call last):
File "/opt/anaconda2/envs/py3/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 451, in cull_kernels
await self.cull_kernel_if_idle(kernel_id)
File "/opt/anaconda2/envs/py3/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 463, in cull_kernel_if_idle
kernel_id, kernel.kernel_name, kernel.last_activity)
AttributeError: 'RemoteKernelManager' object has no attribute 'last_activity'
[I 2020-04-07 16:15:08.969 EnterpriseGatewayApp] Kernel started: 0070571c-4f92-4027-b9e1-1f98cf62421d
Notebook probably should have subclassed juptyer_client's KernelManager to host last_activity, but didn't (and it's too late for that), so we should check its existence before checking its cull status. Since this should only occur milliseconds after a kernel's startup, it won't affect the integrity of the cull.
The text was updated successfully, but these errors were encountered:
KernelManager's last_activity attribute is added following the instance's
creation. Culling (independently) uses this attribute and should ensure
it exists prior to its use, else skip the culling check for that instance.
Fixesjupyter#5345
KernelManager's last_activity attribute is added following the instance's
creation. Culling (independently) uses this attribute and should ensure
it exists prior to its use, else skip the culling check for that instance.
Fixes#5345
Culling runs independently of a kernel's startup and uses the corresponding kernel manager's
last_activity
attribute to help determine if it should be culled or not. However, because thelast_activity
attribute is added to the kernel manager instance dynamically, there's a small (typically < 10ms) window where the culler sees that theKernelManager
instance exists sans itslast_activity
attribute. This can result in the following error on the console:Notebook probably should have subclassed juptyer_client's
KernelManager
to hostlast_activity
, but didn't (and it's too late for that), so we should check its existence before checking its cull status. Since this should only occur milliseconds after a kernel's startup, it won't affect the integrity of the cull.The text was updated successfully, but these errors were encountered: