How to Log and Track Client Disconnection Events in JupyterLab?

Hello,

I’m experiencing an issue with JupyterLab where, upon losing connection to the Jupyter server, the browser displays the following message:

A connection to the Jupyter server could not be established. JupyterLab will continue trying to reconnect. Check your network connection or Jupyter server configuration.

We have built a platform that uses JupyterLab to allow users to write code online. It’s crucial for us to understand the network disconnection patterns our users experience during their sessions. This information will help us enhance the reliability and user experience of our platform.

Here are my specific questions:

  1. Does JupyterLab automatically log client disconnection events on the server?
  2. If not, are there recommended methods or tools to capture and record these events?
  3. Is it possible to achieve this through configuration changes or by writing custom scripts?

I have attempted to increase the server log level but haven’t found any relevant disconnection records. Any suggestions or guidance would be greatly appreciated!

Thank you!

1 Like

I’m not sure who to ask this question. If anyone knows an expert in this area, could you please help to @ them?

Hi @fomightez @manics
I noticed that you have a lot of insights in this area from other questions in the community. You are an expert in this field. I’m wondering if you could take a look about this problem when you have time?