Closed shiyiyue1102 closed 10 months ago
If the buffers are in pendingWriteQueue, then there is no leak.
As long as the producer is faster than the consumer, and there's work to do, the window will stay at 0. That doesn't mean there's no progress. As soon as the window increases, more data is sent, and the widow goes back to 0.
The only thing you need to make sure to do is observe isReady()
to slow sending when the receiver can't keep up.
Thank you for your reply. We have figure out the ultimate cause that triggered my issue,just as you said above. We triggered frequently cmsgcs of client, and keep the underlying tcp client is still working , we reproduced this issue.
If the buffers are in pendingWriteQueue, then there is no leak.
As long as the producer is faster than the consumer, and there's work to do, the window will stay at 0. That doesn't mean there's no progress. As soon as the window increases, more data is sent, and the widow goes back to 0.
The only thing you need to make sure to do is observe
isReady()
to slow sending when the receiver can't keep up.
Seems like this is resolved. If not, comment, and it can be reopened.
grpc-java version:1.50.2
problem description:
we use grpc's Bi-directional streaming to push messages from server to client , and some online clusters occur direct memory leak . after memory analysising ,we. found that many bytebufs are backed up in the DefaultHttp2RemoteFlowController.FlowState's pendingWriteQueue and the window value is 0. After analysis,we consider some reasons that may cause this problem:
really hope to receive your guidance.