'All GRPC calls failed with DEADLINE_EXCEEDED

I have an android app which calls a GRPC service. Sometimes for some clients the GRPC calls starts failing with DEADLINE_EXCEEDED. The request doesn't reach the server. It seems like a DNS resolution issue because the AWS calls also fails with the error unable to resolve host. After a while AWS issue is resolved but the GRPC continues to fail. The app has to be restarted for it to work. The internet connection is up throughout. I suspect the ManagedChannel is corrupted somehow. Any one faced this issue before? Is there a way reset the ManagedChannel without having to restart the app or having to initialize it again?

I am using grpc version 1.39.0. It looks similar to this issue but that bug is supposed to be fixed in 1.7 version. https://groups.google.com/g/grpc-io/c/0t9n1-2GTms



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source