UI does not update after kernel reconnection

Bug description
When we disconnect from the kernel (close or refresh tab, remote connection, pc restart) and reconnect, the UI does not refresh. Cell and notebook state shows idle and disconnected, when in fact this is connected, running and variables are still available. Our current set-up is having JupyerHub as a remote setup on the cloud.

Expected behaviour
Upon reconnecting, the cell and notebook states should refresh.

Actual behaviour
Upon reconnecting, the cell and notebook states do not update.

How to reproduce

  1. Run jupyter lab on jupyterhub
  2. Execute the following script (test.py ยท GitHub)
  3. Refresh the tab
  4. Cell state should show as idle.
  5. Check the file progress.txt , this should still be updating although the notebook shows idle kernel.

Your personal set up

  • OS: CentOS 7, RedHat

  • Version(s): jupyterhub/k8s-hub:1.1.2

  • Logs

PROXY ERROR

08:02:54.765 [ConfigProxy] [34mdebug[39m: PROXY WS /user/bjorn.demicoli/api/kernels/140700ce-4d07-4201-82bc-b6500ac4abc7/channels to http://10.131.4.14:8888
08:03:24.767 [ConfigProxy] [31merror[39m: Uncaught Exception: read ECONNRESET
08:03:24.767 [ConfigProxy] [31merror[39m: Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:209:20)



POD ERROR

[10:22 AM] [E 2021-08-27 07:59:13.236 SingleUserNotebookApp web:1789] Uncaught exception GET /user/bjorn.demicoli/api/kernels/140700ce-4d07-4201-82bc-b6500ac4abc7/channels?session_id=6d1880fe-7a76-473b-adb1-a4c3d9d89cec (::ffff:10.130.0.1)
    HTTPServerRequest(protocol='http', host='jupyterhub.apps.cpb.gigcloud.io', method='GET', uri='/user/bjorn.demicoli/api/kernels/140700ce-4d07-4201-82bc-b6500ac4abc7/channels?session_id=6d1880fe-7a76-473b-adb1-a4c3d9d89cec', version='HTTP/1.1', remote_ip='::ffff:10.130.0.1')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.9/site-packages/tornado/websocket.py", line 956, in _accept_connection
        await open_result
    tornado.util.TimeoutError: Timeout

Any update on this ? I am also facing the similar issue.