I don't think that is the problem in my case.
My server is basically like

for all data
  stream.onNext(data)
stream.onComplete()

I don't see any chance to cause the problem you described.

On Tuesday, July 19, 2016 at 11:23:12 AM UTC-7, Carl Mastrangelo wrote:
>
> If the connection is alive and the server doesn't send anything, the call 
> will just wait.  What does your server code look like?
>
> On Monday, July 18, 2016 at 7:38:54 PM UTC-7, [email protected] wrote:
>>
>> 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/112d9364-2041-4cc8-b0a3-72b67c61eb44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to