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

A graceful shutdown #1938

Closed
unixpi opened this issue Nov 2, 2020 · 0 comments
Closed

A graceful shutdown #1938

unixpi opened this issue Nov 2, 2020 · 0 comments

Comments

@unixpi
Copy link
Contributor

unixpi commented Nov 2, 2020

Is your feature request related to a problem? Please describe.
When attempting to shutdown using Ctrl+c, Shutting down after having received SIGINT is hanging for long enough that I'm exiting the terminal window and opening up a new one to restart.

Describe the solution you'd like
A graceful shutdown.

Describe alternatives you've considered
None.

Additional context
BeaconNode.init() ignores the flag set by our Ctrl+c handler (it doesn't take control of the event loop). As long as this is the case, we can't do a graceful shutdown. See

proc init*(T: type BeaconNode,

The bigger the database, the longer the shutdown takes. It can take a couple of hours on a recent Medalla db.

Stefan's proposed solution
Move most of the stuff from BeaconNode.init() to BeaconNode.run() and make it use that managed event loop. Some extra flags to order async steps are required.

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

No branches or pull requests

2 participants