You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@bkane-msft yes, GracefulStop()https://github.com/grpc/grpc-go/blob/master/server.go#L1901 is the correct way of stopping the gRPC server gracefully. We don't have any official documentation mentioning it though. I will ask the other maintainers if there is any and if not, should we add it.
What version of gRPC are you using?
https://github.com/grpc/grpc-go/blob/89737ae09d06cf745ebeb3c414a83c94b58709e5/examples/helloworld/greeter_server/main.go
What version of Go are you using (
go version
)?n/a
What operating system (Linux, Windows, …) and version?
n/a
What did you do?
I looked to see a good example for graceful shutdown
What did you expect to see?
The example ( https://github.com/grpc/grpc-go/blob/89737ae09d06cf745ebeb3c414a83c94b58709e5/examples/helloworld/greeter_server/main.go ) to show graceful shutdown on a signal
What did you see instead?
The following:
There is also nothing in the Go docs ( https://grpc.io/docs/languages/go/basics/#starting-the-server ) about draining requests / etc on shutdown or signal.
I think this should be in the docs/example as every app needs this. Would you accept a PR to add it?
The text was updated successfully, but these errors were encountered: