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

Better detect when Livebook runs out of memory on install #2075

Closed
josevalim opened this issue Jul 15, 2023 · 2 comments · Fixed by #2128
Closed

Better detect when Livebook runs out of memory on install #2075

josevalim opened this issue Jul 15, 2023 · 2 comments · Fixed by #2128
Labels
area:backend Related to the backend chore Technical changes contributions welcome Ready to implement (contributions welcome)
Milestone

Comments

@josevalim
Copy link
Contributor

On machines with low memory, it is most likely installation will fail. We can try to detect those scenarios and show a message to the user when it happens.

In a nutshell, the idea is to change the URL when installing to add a parameter. The parameter can store information such as the current node identifier (randomly generated) and the current timestamp. If the app restarts, we will try to join the same URL and redirect because the session does not exist. If that's the case we can and

  1. there are no sessions
  2. the node identifier in the parameter does not match the current node
  3. Node.list == [] is empty
  4. and it has happened within 150 seconds

We can then show an error message saying the notebook belonged to another Livebook instance and it most likely crashed during installation. We mention installation may be expensive and a larger machine may be necessary.

@josevalim josevalim added chore Technical changes area:backend Related to the backend labels Jul 15, 2023
@josevalim josevalim added this to the v0.11 milestone Jul 15, 2023
@josevalim josevalim added the contributions welcome Ready to implement (contributions welcome) label Jul 19, 2023
@ByeongUkChoi
Copy link
Contributor

How can I detect when Livebook runs out of memory on install?

@josevalim
Copy link
Contributor Author

Unfortunately it is not really possible to detect, and that's part of the problem. I pushed an attempted solution here #2128 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:backend Related to the backend chore Technical changes contributions welcome Ready to implement (contributions welcome)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants