brpc作为grpc客户端访问apisix的时候报错'remote_window_left is not enough'

未关闭
#3,142 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp, grpc
领域
api, networking

调研方向

使用 example/grpc_c++/client.cpp 中的 brpc example command,通过 APISIX 发送大于 100k 的 payload,复现该故障,并与 grpcurl 进行比较。首先跟踪 src/brpc/policy/http_rpc_protocol.cpp、src/brpc/socket.cpp 和 src/brpc/controller.cpp 中的 HTTP/2 请求和错误日志。完成的标准是相同的大请求能够成功返回,且不再出现 remote_window_left 错误。

由索引模型根据 Issue 内容生成。

描述

Describe the bug
root@f9269de0e3d8:~/github/brpc/example/grpc_c++/build# ./client --protocol=h2:grpc --server=127.0.0.1:9080 --payload_size=200012 --max_retry=0 --timeout_ms=1000 --h2_client_stream_window_size=40000000 --h2_client_connection_window_size=50000000 I1107 07:58:44.008261 77805 0 /root/github/brpc/src/brpc/socket.cpp:2865] GetAgentSocket: 1 W1107 07:58:44.010063 77812 4294969089 /root/github/brpc/src/brpc/policy/http_rpc_protocol.cpp:397] HTTP response status code: 500 E1107 07:58:44.010094 77812 4294969089 /root/github/brpc/src/brpc/controller.cpp:606] RPC failed: [E1010]HTTP/2.0 500 Internal Server Error code: 1010 W1107 07:58:44.010146 77805 0 /root/github/brpc/example/grpc_c++/client.cpp:89] [E1010]HTTP/2.0 500 Internal Server Error E1107 07:58:45.010367 77805 0 /root/github/brpc/src/brpc/controller.cpp:606] RPC failed: [E2004]remote_window_left is not enough, data_size=200021 code: 2004 W1107 07:58:45.010465 77805 0 /root/github/brpc/example/grpc_c++/client.cpp:89] [E2004]remote_window_left is not enough, data_size=200021 E1107 07:58:46.010671 77805 0 /root/github/brpc/src/brpc/controller.cpp:606] RPC failed: [E2004]remote_window_left is not enough, data_size=200021 code: 2004 W1107 07:58:46.010768 77805 0 /root/github/brpc/example/grpc_c++/client.cpp:89] [E2004]remote_window_left is not enough, data_size=200021

使用grpcurl就没有这个问题

To Reproduce
向apisix发送大于100k的数据包

Expected behavior
正常返回数据

Versions
OS: ubuntu
Compiler: g++ 13.3.0
brpc:
protobuf:

Additional context/screenshots

主要语言
C++
星标
17.6k
派生
4.2k
平均合并
3 天 17 小时
30 天内合并 PR
72

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/brpc 的其他 Issue

查看 apache/brpc 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。