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

Memory leak in protocol dubbo maybe #163

Closed
pantianying opened this issue Aug 13, 2019 · 1 comment
Closed

Memory leak in protocol dubbo maybe #163

pantianying opened this issue Aug 13, 2019 · 1 comment

Comments

@pantianying
Copy link
Member

pantianying commented Aug 13, 2019

What happened:
Running for several days with dubbo-go,I see the graphical display of memory of this project, and show this:(The ordinate is the percentage of machine memory, and the machine configuration is 2G memory.)
image

then I use go pprof to see what is wrong,here is my log:
image

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):
I use geneic $invoke and have about 60 interfaces,About 1,000 requests per hour during the day。
show my code :
image
image

Anything else we need to know?:

@sxllwx
Copy link
Member

sxllwx commented Aug 14, 2019

From pprof file, I got result.image

Lot of memory used by github.com/apache/dubbo-go/protocol/dubbo.NewPendingResponse function then store the object to sync.Map , but not clean after heatbeat response got.

logger.Debugf("get rpc heartbeat response{header: %#v, body: %#v}", p.Header, p.Body)
if p.Err != nil {
logger.Errorf("rpc heartbeat response{error: %#v}", p.Err)
}
return

AlexStocks added a commit that referenced this issue Aug 14, 2019
[ISSUE #163] clean heartbeat from PendingResponse
LaurenceLiZhixin pushed a commit to LaurenceLiZhixin/dubbo-go that referenced this issue Jul 17, 2021
* add tracing integration test

* refactor imports

* update metadata service import to local & remote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants