grpc-ecosystem / grpc-spring

Spring Boot starter module for gRPC framework.
https://grpc-ecosystem.github.io/grpc-spring/
Apache License 2.0
3.52k stars 826 forks source link

gRPC Server unavailable just after restart/deployment #863

Closed RupavJain closed 1 year ago

RupavJain commented 1 year ago

The context

What do you wish to achieve? Reestablish the connection with gRPC Server after Server is restarted (or new instance gets deployed)

The question

What's the problem? What's not working? What's missing and why do you need it? Once Server is restarted, Client which had already established channel with the server, now unable to reach to client - and gives unavailability error.

Stacktraces and logs

Do you have any relevant stacktraces or logs of your attempts?

The application's environment

Which versions do you use?

Additional information

ST-DDT commented 1 year ago

How do you access the server/resolve the address? It is likely that I'm unable to help you with this issue as this might have something to do on how grpc java handles connections. You might have to configure connection timeouts or request retry and for that you have to ask on the grpc-java repo or stackoverflow for help. If there is a property for that, that I could add support for please let me know.

ST-DDT commented 1 year ago

Looks like there is nothing we can do here.

gaoxingliang commented 8 months ago

add the below configurations will help:

      enableKeepAlive: true
      keepAliveWithoutCalls: true