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

Server gets immediately nuked on restart/stop, no chance to run shutdown events/hooks #13

Open
foosel opened this issue Nov 28, 2023 · 0 comments

Comments

@foosel
Copy link
Member

foosel commented Nov 28, 2023

It looks like we have a behaviour change in that regard from from OctoPi < 1.0.0 to OctoPi >= 1.0.0.

Example:

OctoPi 0.18.0:

2023-11-28 17:52:47,473 - octoprint.server - INFO - Shutting down...
2023-11-28 17:52:47,485 - octoprint.server - INFO - Calling on_shutdown on plugins
2023-11-28 17:52:47,489 - octoprint.events - INFO - Processing shutdown event, this will be our last event
2023-11-28 17:52:47,672 - octoprint.events - INFO - Event loop shut down
2023-11-28 17:52:47,921 - octoprint.plugins.tracking - INFO - Sent tracking event shutdown, payload: {}
2023-11-28 17:52:48,111 - octoprint.server - INFO - Goodbye!
2023-11-28 17:52:55,660 - octoprint.startup - INFO - ******************************************************************************
2023-11-28 17:52:55,663 - octoprint.startup - INFO - Starting OctoPrint 1.9.3
2023-11-28 17:52:55,665 - octoprint.startup - INFO - ******************************************************************************

OctoPi 1.0:

2023-11-28 17:58:10,696 - octoprint.plugins.github_release_patcher - INFO - Started dummy release server on http://127.0.0.1:50672
2023-11-28 17:58:10,696 - octoprint.plugins.github_release_patcher - INFO - Set Github release URL to http://127.0.0.1:50672/releases/{user}/{repo}
2023-11-28 18:01:21,363 - octoprint.startup - INFO - ******************************************************************************
2023-11-28 18:01:21,366 - octoprint.startup - INFO - Starting OctoPrint 1.9.3
2023-11-28 18:01:21,367 - octoprint.startup - INFO - ******************************************************************************

No shutdown events triggered. It looks like the systemd unit on 1.0 simply nukes away the server directly, whereas on OctoPi < 1.0 it still got a chance to cleanly shut down. That's something that needs to get looked at, but that's rather something for OctoPrint/OctoPi-UpToDate or guysoft/OctoPi.

Originally posted by @foosel in OctoPrint/OctoPrint#4882 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant