Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing stale connection: .... #28

Closed
Whadup opened this issue Nov 6, 2017 · 12 comments
Closed

Replacing stale connection: .... #28

Whadup opened this issue Nov 6, 2017 · 12 comments

Comments

@Whadup
Copy link

Whadup commented Nov 6, 2017

Quite frequently, when I execute a block, I get the above error message in my jupyter notebook and it takes a few seconds until I get a result in sublime.

It is quite annoying, because other times the code is executed instantly.

I'm happy to provide more information if you have any questions.

Here is an exempt of my jupyter log:

[I 09:25:24.222 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[I 09:25:24.233 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[I 09:25:26.024 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[I 09:25:26.035 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[W 09:25:26.959 NotebookApp] Replacing stale connection: bca632cf-1fab-413a-98b3-9897e963815e:423585cf8f6a418ea024e95799345d3d
[I 09:25:31.963 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[I 09:25:31.979 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[W 09:27:01.985 NotebookApp] WebSocket ping timeout after 90005 ms.
[I 09:30:00.640 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[I 09:30:00.655 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[W 09:30:43.169 NotebookApp] Replacing stale connection: bca632cf-1fab-413a-98b3-9897e963815e:423585cf8f6a418ea024e95799345d3d
[I 09:30:48.177 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[I 09:30:48.195 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[W 09:31:01.418 NotebookApp] Replacing stale connection: bca632cf-1fab-413a-98b3-9897e963815e:423585cf8f6a418ea024e95799345d3d
[I 09:31:06.426 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[I 09:31:06.441 NotebookApp] Adapting to protocol v5.1 for kernel bca632cf-1fab-413a-98b3-9897e963815e
[W 09:31:20.283 NotebookApp] Replacing stale connection: bca632cf-1fab-413a-98b3-9897e963815e:423585cf8f6a418ea024e95799345d3d

@ngr-t
Copy link
Collaborator

ngr-t commented Nov 10, 2017

Thank you for reporting an issue! Also sorry for the annoying behavior.

I might found the cause and going to release a minor update to fix it soon. Could you confirm whether the performance issue remains after update?

That was because a WebSocket connection is not closed after communicating with the kernel. It forces Jupyter to replace connection and makes significant performance problem.

@Whadup
Copy link
Author

Whadup commented Nov 10, 2017

happy to help and test, looking forward to the commit.

@ngr-t
Copy link
Collaborator

ngr-t commented Nov 10, 2017

I've just released the new version with fix. This commit works at least in my hands.

Please let me know whether it works for you.

@Whadup
Copy link
Author

Whadup commented Nov 13, 2017

Feels more responsive. There are still log messages that read "replacing stale connection".

@ngr-t
Copy link
Collaborator

ngr-t commented Nov 13, 2017

Thank you for confirmation.

I also found sometimes it still happens and I'm trying to find out a way to solve it.

It seems that it happens when we try to create a new WebSocket connection while there is already one.
Hermes plugin runs several threads that requires WebSocket connection to a Jupyter kernel, but I've implemented them insensitively about it. I'm trying to marshal them.

@Whadup
Copy link
Author

Whadup commented Nov 14, 2017

If i start a long computation that prints output during the computation, I only see the output when all computations are finished. In contrast in a jupyter notebook, the output is shown the moment in happens.

Is there a way to achieve this behaviour in sublime?

@ngr-t
Copy link
Collaborator

ngr-t commented Nov 14, 2017

There must be a way to achieve it within Sublime, but currently this plugin can't deal with.

@blaggacao
Copy link

blaggacao commented Dec 21, 2017

I installed today via ST3 package manager and I have slightly different log:

[I 13:05:25.545 NotebookApp] Restoring connection for bb1384fb-55f5-4a11-a06f-544359368d9e:81a57ed174144d239abf5a2deed0368f
[W 13:06:12.341 NotebookApp] Replacing stale connection: bb1384fb-55f5-4a11-a06f-544359368d9e:81a57ed174144d239abf5a2deed0368f
[I 13:06:17.343 NotebookApp] Starting buffering for bb1384fb-55f5-4a11-a06f-544359368d9e:81a57ed174144d239abf5a2deed0368f
[I 13:06:17.344 NotebookApp] Adapting to protocol v5.1 for kernel bb1384fb-55f5-4a11-a06f-544359368d9e

@blaggacao
Copy link

After closing the web browser session, I only see:

[W 13:11:16.944 NotebookApp] WebSocket ping timeout after 90000 ms.
[I 13:11:21.948 NotebookApp] Starting buffering for bb1384fb-55f5-4a11-a06f-544359368d9e:81a57ed174144d239abf5a2deed0368f
[I 13:11:31.885 NotebookApp] Adapting to protocol v5.1 for kernel bb1384fb-55f5-4a11-a06f-544359368d9e
[I 13:11:31.887 NotebookApp] Restoring connection for bb1384fb-55f5-4a11-a06f-544359368d9e:81a57ed174144d239abf5a2deed0368f

Sidenote, I just used the same standard token when you do jupyter notebook list...
No configuration a part from the standard config file generation, whatsoever...

@ngr-t
Copy link
Collaborator

ngr-t commented Dec 26, 2017

@blaggacao Thanks. Maybe the same issue.

@ngr-t
Copy link
Collaborator

ngr-t commented Jul 12, 2018

New version of Hermes (v0.5.0) doesn't use WebSocket, so this issue should be solved.

@pykong
Copy link
Collaborator

pykong commented Feb 28, 2020

Potentially solved. Stale. Closing.

@pykong pykong closed this as completed Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants