I run into an issue that `BlockingResponseStream.hasNext` occasionally 
blocks forever while sending response for a streaming RPC. 
GRPC server is still able to serve requests after client hangs. No 
exception is found in server log, and server does call 
"responseObserver.onCompleted()" after each GRPC.
It only happens to me when streaming millions of messages.
I haven't found any reliable way to reproduce this issue, but following 
code and comment in `ClientCalls.java` caught my attention:

try {
>   // Will block here indefinitely waiting for content. RPC timeouts defend 
> against permanent
>   // hangs here as the call will become closed.
>   last = waitForNext();
> } catch (InterruptedException ie) {
>   Thread.currentThread().interrupt();
>   throw Status.CANCELLED.withCause(ie).asRuntimeException();
> }


I am not vary familiar with GRPC codebase. Could someone tell me when is 
this call going to block and which thread usually unblocks it? What could 
cause the call being blocked forever?
It seems GRPC does not timeout by default. Should I specify RPC timeout? 
What's the best practice for streaming millions of messages?

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/a5c4a534-6114-42a6-96e0-b18fc2b7a09e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to