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.
Uh oh!
There was an error while loading. Please reload this page.
-
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.
It appears that a DNS query never completes, causing the InetAddress request to block. Since this happens during stream creation, the thread responsible for creating the session hits its deadline.
When the deadline is reached, the code attempts to cancel the stream. My question is: can a stream cancel operation be blocked if the underlying DNS resolution is still hanging or unresponsive?
Any insights into how gRPC handles stream cancellation in the presence of unresolved DNS queries would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions