Skip to content
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

2.6版本不包含 max_body_size ,无法调整brpc max_body_size,导致报错 #69851

Closed
noahdyp opened this issue Nov 30, 2024 · 2 comments
Closed
Labels

Comments

@noahdyp
Copy link

noahdyp commented Nov 30, 2024

bug描述 Describe the Bug

E1130 16:30:07.186429 75 baidu_rpc_protocol.cpp:118] body_size=109507652 from 192.168.142.57:58816 is too large
E1130 16:30:07.186448 75 input_messenger.cpp:139] A message from 192.168.142.57:58816(protocol=baidu_std) is bigger than 67108864 bytes, the connection will be closed. Set max_body_size to allow bigger messages

其他补充信息 Additional Supplementary Information

No response

@noahdyp
Copy link
Author

noahdyp commented Dec 2, 2024

解决思路:

  1. 用动态库暴露brpc 的 gflags参数
  2. python中显示更新max_body_size

`
echo '
#include <gflags/gflags.h>
#include <pybind11/pybind11.h>

namespace brpc {
DECLARE_uint64(max_body_size);
}

namespace py = pybind11;

PYBIND11_MODULE(brpc_flags, m) {
m.def("get_max_body_size", {
return brpc::FLAGS_max_body_size;
}, "A function that returns the max body size.");

m.def("set_max_body_size", [](int64_t new_size) {
    brpc::FLAGS_max_body_size = new_size;
}, "A function that sets the max body size.");

}' > brpc_flags.cc
`

@noahdyp
Copy link
Author

noahdyp commented Dec 2, 2024

bug描述 Describe the Bug

E1130 16:30:07.186429 75 baidu_rpc_protocol.cpp:118] body_size=109507652 from 192.168.142.57:58816 is too large E1130 16:30:07.186448 75 input_messenger.cpp:139] A message from 192.168.142.57:58816(protocol=baidu_std) is bigger than 67108864 bytes, the connection will be closed. Set max_body_size to allow bigger messages

其他补充信息 Additional Supplementary Information

No response

@noahdyp noahdyp closed this as completed Dec 2, 2024
@paddle-bot paddle-bot bot added status/close 已关闭 and removed status/new-issue 新建 labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant