[grpc-Java] Query regarding ping deadline exceeded

67 views
Skip to first unread message

R Chinmay

unread,
Apr 12, 2024, 2:53:14 PM4/12/24
to grpc.io
We are trying to differentiate between deadline exceeded during method call on server, or when the connection hasn't been established yet. In both cases we receive a generic log 
with status DEADLINE_EXCEEDED. We went through gprc code, but couldn't figure out where the ping call was being made. We request you to help clarify on the following points:
1. Can you provide code reference where client calls ping to server and waits for the ack?
2. Does all the channel calls go through this ping call with server?
3. Is there any way to provide a custom timeout for the ping call which is different that the entire timeout for the method execution?
4. We saw that some of the calls receive `waiting_for_connection` in the description of the deadline exceeded exception on client side. Is it due to the ping call timing out or the method call timing out?

Eric Anderson

unread,
Apr 19, 2024, 4:45:56 PM4/19/24
to R Chinmay, grpc.io
On Fri, Apr 12, 2024 at 11:53 AM R Chinmay <chinma...@gmail.com> wrote:
In both cases we receive a generic log with status DEADLINE_EXCEEDED.

I see "[grpc-Java]" in the email subject. Are you actually using grpc-java? gRPC Java provides a lot of information in the string part of the status.
 
1. Can you provide code reference where client calls ping to server and waits for the ack?

Why are you talking about pings?

4. We saw that some of the calls receive `waiting_for_connection` in the description of the deadline exceeded exception on client side. Is it due to the ping call timing out or the method call timing out?

waiting_for_connection is part of the additional details that grpc-java provides. To tell you what is happening, we need that debug information.

waiting_for_connection means the load balancer hadn't selected a connection for the RPC. So that means the RPC was never sent. This is commonly caused by slow DNS or connection establishment, or the server being unavailable. waiting_for_connection is temporary; after a while the connection attempt will fail and RPCs will fail, or the connection attempt succeeds and RPCs are sent to a server.
Reply all
Reply to author
Forward
0 new messages