-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 1.999884080s. [closed=[], open=[[buffered_nanos=2001703685, waiting_for_connection]]] at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262) #10365
Comments
The first time you use the channel, gRPC will connect to the server which may take some time. Since you are giving a deadline of 2 seconds, if the combination of connecting, transporting over the network both ways and server side processing exceeds 2 seconds you will get a timeout as you describe. Since you specified an idle timeout of 2 minutes, at the 20 second point the connection would still be active so the next invocation wouldn't have the overhead of setting up the connection. Increasing the timeout on the method call to 10 seconds will probably eliminate the problem. |
Thank you very much, but this happened during the running of the program, and there was still traffic in the last second, and then a 20-second timeout exception occurred, and then it returned to normal by itself. Is it caused by network jitter to re-establish the tcp link? |
If you use the current version of gRPC do you still see the delay? |
20 second timeout sounds like connect() timed out, although it would have been better to paste the exact error text. There may have been a bad address or the network was busted for a while. Either way the delay seems caused by the network. You might end up benefiting from Happy Eyeballs, as if one address is slow it allows continuing on to the next without waiting the full 20 seconds. You could follow along on progress of grpc/proposal#356 , which looks to add Happy Eyeballs. And also #10486 |
I encountered some problems with grpc-java, please help, thank you very much.
My version number is 1.45.4.
My code is as follows:
grpc remote call code is
I get some error messages and after 20 seconds it's fine again
The text was updated successfully, but these errors were encountered: