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

Handle graceful shutdown by handling SIGTERM on Client and Silo #173

Open
zhifenglee-aelf opened this issue Mar 3, 2025 · 0 comments
Open
Assignees

Comments

@zhifenglee-aelf
Copy link

User Story
As a developer, I want both the Client and Silo to handle SIGTERM signals gracefully so that when the application is instructed to shut down, it can close connections, flush logs, and release resources properly without causing abrupt termination or data loss.


Details & Requirements

  1. Signal Handling for SIGTERM

    • Implement a signal handler in both the Client and Silo processes to catch SIGTERM.
    • Ensure that the handler initiates a graceful shutdown procedure rather than an immediate termination.
  2. Logging and Monitoring

    • Log the receipt of the SIGTERM signal and record key steps in the shutdown process.
    • Monitor the shutdown process to ensure that all components have terminated as expected.
  3. Testing and Validation

    • Test the graceful shutdown by sending SIGTERM signals in a development environment.
    • Validate that no data is lost and that the shutdown completes within an acceptable time frame.
    • Verify that all resources (connections, file handles, etc.) are released properly.

Acceptance Criteria

  • Signal Handling:
    • Both Client and Silo processes correctly catch SIGTERM signals.
  • Graceful Shutdown:
    • The Silo stops accepting new requests and completes or cancels in-flight operations gracefully before terminating.
    • The Client closes connections and releases resources without abrupt termination.
  • Logging:
    • Detailed logs are recorded showing the receipt of the SIGTERM signal and the steps taken during the shutdown process.
  • Testing:
    • Automated or manual tests confirm that the system shuts down gracefully under SIGTERM without data loss or resource leaks.
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

No branches or pull requests

2 participants