Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Jupyter Lab Stuck on executing code with JEG--NB2KG setup. #39

Closed

Description

Hi,

Brief background:-

We are using jupyter lab setup with Jupyter Enterprise gateway setup and with NB2KG to override the required classes. We had noticed that the kernels spawned were closing the websockets after a timeout and we created a pull request here:- jupyter-server/enterprise_gateway#698 to refrain kernels from closing the websocket connection and it seems to work fine. (At least the logs from servers end reflect this)

Problem:-

We launch a kernel remotely and if there are intermittent client disconnection the websocket connection still remains alive which is good. But in cases were we close the laptop for let's say 45 minutes and then come back and execute any cell, the execution gets stuck with * symbol.

I tried debugging with a lot of conditions, it seems at the end of the day, the websocket message from the client is conveyed properly to nb2kg which tries to send this to KernelGateway using this

def on_message(self, message):

But the somewhere the final call in websocket library is indefinitely stuck (probably there is a closure in internal stream or something) which does not actually complete the write message process for this web socket client.

Solution :-
Any ideas why this could be happening. From my understanding there is no websocket client close event being called because I have monitored the logs multiple times, so we always have ws object alive, but whenever we try to send the message there is obvious failure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions