Skip to content

Implement graceful shutdown timeout period #4540

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

liliankasem
Copy link
Member

@liliankasem liliankasem commented Jul 18, 2025

Issue describing the changes in this PR

resolves #4355

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • I have added all required tests (Unit tests, E2E tests)

Additional information

  • Implement graceful shutdown timeout period (2 seconds) - this allows the host to gracefully shut down but will force exit if the host takes longer than the timeout period.
  • Fix bug where we get a null ref error if we shut down the host during startup

@liliankasem liliankasem requested a review from a team as a code owner July 18, 2025 19:25
@liliankasem liliankasem requested review from jviau and soninaren July 18, 2025 19:27
@liliankasem liliankasem changed the title Implement force exit on second cancel key [WIP] Implement force exit on second cancel key Jul 18, 2025
@liliankasem liliankasem force-pushed the liliankasem/force-exit branch from d99ac94 to 23d4cb3 Compare July 23, 2025 01:40
@liliankasem liliankasem changed the title [WIP] Implement force exit on second cancel key Implement graceful shutdown timeout period Jul 23, 2025
@liliankasem
Copy link
Member Author

@mattchenderson @fabiocav - as per @jviau suggestion, I've switched over to a grace period approach. We will give the host 2 seconds to gracefully shut down, if it does not we kill the process. The behaviour on pressing Ctrl+C remains the same where the host shutdown event is signalled and it starts its graceful shutdown process.

After we address the bug in the host, the host should shutdown with the 2 seconds pretty much every time so there shouldn't be an major impact. On the plus side, if anything ever occurs where the host does take longer, thats not something we need to worry about for local dev with the graceful timeout period.

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.

Core tools not responding to ctrl-C
4 participants