网络抖动造成client iobuf泄漏OOM
Describe the bug (描述bug) 网络丢包率和拥塞增加时,rpc client iobuf使用量激增,造成OOM
To Reproduce (复现方法) 正在尝试复现
Expected behavior (期望行为) iobuf及时回收,不造成OOM
Versions (各种版本) OS: CentOS release 6.3 2.6.32_1-28-0-0 (BAIDU) Compiler: gcc 4.8.2 brpc: baidu 内部版本 baidu-rpc:stable:a35fbd9d8341ad69412001d482f8e893c47df237 protobuf: 2-6-1-400
Additional context/screenshots (更多上下文/截图)
同样遇到这个问题,rpc channel连接数量稳定在5000,io-buf一直上涨
我猜测,这个问题根本原因是brpc,依赖tc_malloc库,这个库其实很不好。开辟的大块内存,最后都不会被操作系统回收。尽管你调用了free。需要强制调用tcmalloc内置free函数。建议brpc后面版本更新至jemalloc。
建议设置ServerOptions.idle_timeout_sec为7200,有时候连接会出现一端是ESTABLISHED,一端已经断开了,这个时候ESTABLISHED端的IOBuf就会leak
建议设置ServerOptions.idle_timeout_sec为7200,有时候连接会出现一端是ESTABLISHED,一端已经断开了,这个时候ESTABLISHED端的IOBuf就会leak
请问为什么会泄漏啊?ESTABLISHED端的request请求堆积吗,还是怎么说
We close this issue because it is irreproducible and inactive for a long time. If you can reproduce this issue with the latest version of bRPC, please reopen this issue and tell us how to reproduce.