brpc作为grpc客户端访问apisix的时候报错'remote_window_left is not enough'
- Dominant language
- C++
- Stars
- 17.6k
- Forks
- 4.1k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 69
Description
**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**
Contributor guide
Research direction
Reproduce the failure with the brpc example command in example/grpc_c++/client.cpp, sending a payload larger than 100k through APISIX, and compare it with grpcurl. Start by tracing the HTTP/2 request and error logs in src/brpc/policy/http_rpc_protocol.cpp, src/brpc/socket.cpp, and src/brpc/controller.cpp. Done means the same large request returns successfully without the remote_window_left error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, grpc
- Domain
- api, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100