Stream refused by server

79 views
Skip to first unread message

Rajan Shah

unread,
Dec 18, 2023, 2:21:49 PM12/18/23
to grpc.io
When the load increases on the GRPC Server I am seeing Error 14 on the GRPC Client. Which essentially says that the stream is refused by the server.  How can we resolve this as the data is not even seen by the GRPC Server it is only being printed on the Client logs.

Is there any buffer which I can increase ?

Context:

I have a bidirectional grpc connection using Java 8 with flatbuffers.  

similar to this issue https://github.com/grpc/grpc-node/issues/1969

Thanks
Rajan

Larry Safran

unread,
Dec 18, 2023, 4:38:12 PM12/18/23
to Rajan Shah, grpc.io
Rajan,
  Do you have retries enabled?  That would be your first line of defense.

On the server side, giving the server more resources  may help.  You could directly use NettyServerBuilder for more fine grained control through ChannelOptions (using .withOptions() method).  Specifically options CONNECT_TIMEOUT_MILLIS and SO_BACKLOG.

Hope that helps,
  Larry

--
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 grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/20f7f32b-f42f-4e5a-a96a-c038d69f4617n%40googlegroups.com.

Rajan Shah

unread,
Dec 19, 2023, 3:41:33 PM12/19/23
to Larry Safran, grpc.io
We already have 3 times GRPC Client retries, I will try out the NettyServerBuilder. But the NettyServerBuilder has the ExperimentalApi annotation, should we be using this in production systems. 

Larry Safran

unread,
Dec 19, 2023, 3:46:10 PM12/19/23
to Rajan Shah, grpc.io
ExperimentalApi means that we reserve the right to break backward compatibility in the future.  However, we do ensure that they function correctly.  Generally, this means that they may behave slightly differently or that ABI compatibility is broken.  If you are okay with recompiling to upgrade to some future version of grpc-java, then it is okay to use in production systems.

Thanks,
  Larry

Yuri Golobokov

unread,
Dec 19, 2023, 4:32:52 PM12/19/23
to grpc.io
What is the server you are connecting to? Is there some proxy between client and server?
Some proxies/servers may reject new streams when they are overloaded.
Then looking at your load balancing setup and improving that may help.

Reply all
Reply to author
Forward
0 new messages