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

fix: close kernels on shutdown of asgi/starlette server #930

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

maartenbreddels
Copy link
Contributor

Since Flask does not have lifecycle management, we cannot do the same for Flask.

We could implement this for Flask by listening to signals, but that's not the responsibility of the solara server.

Fixes #929

Since Flask does not have lifecycle management, we cannot do the same for Flask.

We could implement this for Flask by listening to signals, but that's
not the responsibility of the solara server.
@maartenbreddels maartenbreddels temporarily deployed to fix_close_kernels_on_shutdown - solara-stable PR #930 December 15, 2024 20:38 — with Render Destroyed
Copy link
Collaborator

@iisakkirotko iisakkirotko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to merge. Just the one question (and we can always implement that later)

try:
context.close()
except: # noqa
logger.exception("error closing kernel on shutdown")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be useful to identify which kernel's shutdown failed for logging purposes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the ID gives much information, but this will show the stacktrace, which should give a hint.

@maartenbreddels maartenbreddels merged commit af3aaf9 into master Dec 17, 2024
27 checks passed
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

Successfully merging this pull request may close these issues.

2 participants