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

Graceful shutdown docs/example/default-impl #144

Closed
xd009642 opened this issue Nov 21, 2019 · 2 comments
Closed

Graceful shutdown docs/example/default-impl #144

xd009642 opened this issue Nov 21, 2019 · 2 comments
Milestone

Comments

@xd009642
Copy link
Contributor

Graceful shutdown is recommended for GRPC servers. Upon receiving a SIGTERM stop serving new requests and wait a maximum predetermined amount of time to finish existing requests before closing the program. This would be helpful to document if it's done already or add an example showing how to add it. Even better would be adding a recommended implementation of this that users can enable either in this crate or via another crate.

It does also change the response from a health checking service so should be considered when doing #135

@LucioFranco LucioFranco added this to the 0.1 milestone Dec 6, 2019
@LucioFranco
Copy link
Member

This is now supported via #169

@clarkmcc
Copy link

and wait a maximum predetermined amount of time to finish existing requests before closing the program

Is it just me, or is tonic killing all requests immediately upon shutdown? If I put a sleep on a unary request and then send a signal that I am capturing and forwarding on to Tonic, the server just dies immediately.

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

3 participants