-
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
golang grpc client 请求 brpc服务,在response非常大的时候报错 #1087
Comments
grpc client默认的window size是65K,如果请求的response超过这个值,需要设置一下grpc client的stream_size |
嗯,发现单独设置stream_size无效,加上connect size,maxmessagesize 已经OK了。 |
麻烦问一下是具体哪个参数,我也遇到了 |
grpc.DialContext的opts增加如下选项 grpc/grpc-go#1210 即可,大小可以根据需要调整: grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(math.MaxInt32),
grpc.MaxCallSendMsgSize(math.MaxInt32)),
grpc.WithInitialConnWindowSize(math.MaxInt32),
grpc.WithInitialWindowSize(math.MaxInt32) |
c++ 或者python 用grpc 的时候也会报同样的错,但是没有window size 可以设置 |
c++ 找到设置方法了么?参考窗口大小可以通过 grpc.http2.lookahead_bytes 设置,还未找到手动设置ConnWindowSize。response过大时 grpc 客户端访问brpc 还是报FLOW_CONTROL_ERROR。 |
问题困扰两年多了,一直没有找到如何解决。 |
when run `curve fs status copyset`, while get error: ```bahs rpc error: code = ResourceExhausted desc = stream terminated by RST_STREAM with error code: FLOW_CONTROL_ERROR ``` Refer to [issue](apache/brpc#1087). Signed-off-by: Cyber-SiKu <Cyber-SiKu@outlook.com>
when run `curve fs status copyset`, while get error: ```bahs rpc error: code = ResourceExhausted desc = stream terminated by RST_STREAM with error code: FLOW_CONTROL_ERROR ``` Refer to [issue](apache/brpc#1087). Signed-off-by: Cyber-SiKu <Cyber-SiKu@outlook.com>
遇到了同样的问题,还没解决。有解决的大佬请给回复下,谢谢。 |
brpc/src/brpc/policy/http2_rpc_protocol.cpp Lines 1696 to 1709 in 6de560b
看样子可能是因为这里引起的,如果当前传输数据大于 remote_window_left 就直接 ResetStream 了,如 TODO 描述应该可以等到 remote_window_left 有空余的时候再继续发送。 |
目前的workaround是设置grpc client的stream_size和conn_size。如果有兴趣的话可以给我们提一个PR @ehds |
Describe the bug (描述bug)
rpc error: code = ResourceExhausted desc = stream terminated by RST_STREAM with error code: FLOW_CONTROL_ERROR
To Reproduce (复现方法)
请求获取的数据量很大的时候复现。请求的数据比较小的时候是正常的。
Expected behavior (期望行为)
正常处理
Versions (各种版本)
OS:
Compiler:
brpc:
protobuf:
Additional context/screenshots (更多上下文/截图)
The text was updated successfully, but these errors were encountered: