-
|
I'm encountering an issue with an on-premises service where, intermittently, a DNS error occurs. This error repeats several times, and after a few retries, the service hangs. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
RPCs/Streams are completely separate from DNS and connection establishment. RPC threads are not used at all for those operations. If you cancel a stream, or its deadline expires, that happens near-instantly. It is not dependent on I/O. (At time there are some thread-hops, so there is a small processing delay, but no I/O.) |
Beta Was this translation helpful? Give feedback.
-
|
Is it possible to inject a different Listener2 and have a custom onError ? Or any other suggestion(s) ? Thank you. |
Beta Was this translation helpful? Give feedback.
-
|
I understand that. But rather than reaching a state where the DNS hangs a VM I prefer to trigger a shutdown of that VM and avoid having a manual intervention. |
Beta Was this translation helpful? Give feedback.
Hangs a VM? The RPC should fail. If it isn't failing, you may just have to wait a bit longer for the DNS timeout. It sounds like you may want to know when the channel is unhealthy. You can use
managedChannel.getState(false)to notice when it is TRANSIENT_FAILURE.