Skip to content

Fix memory leak: delete pending reply callback after reply - #99

Open
kyh wants to merge 2 commits into
hunterloftis:masterfrom
kyh:master
Open

kyh wants to merge 2 commits into
hunterloftis:masterfrom
kyh:master

Conversation

@kyh

@kyh kyh commented Jun 21, 2019

Copy link
Copy Markdown

The exchange has a memory leak that's only noticeable in high volume traffic. We append a callback function to pendingReplies but never remove it once it's called.

Here are some screenshots of our worker memory before and after this fix:
Screenshot_2018-03-15_13_22_39_png

After:
Screen Shot 2018-04-11 at 3 50 54 PM

This fixes a memory leak in pendingReplies
@matmar10

Copy link
Copy Markdown
Collaborator

Awesome, @tehkaiyu - thanks for the contribution! It looks like the build is failing when testing this change; can you investigate? Will gladly merge the PR once we verify it's a non-breaking change.

@kyh

kyh commented Jun 22, 2019

Copy link
Copy Markdown
Author

Yep I'll take a look this weekend

@kyh

kyh commented Jun 24, 2019

Copy link
Copy Markdown
Author

Hmm, tests seem to pass locally, any chance this is an issue with the travis setup?
bash

Travis logs seem to indicate that it can't connect to the amqp port: https://travis-ci.org/hunterloftis/jackrabbit/jobs/548540256

Uncaught Error: connect ECONNREFUSED 127.0.0.1:5672

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

Successfully merging this pull request may close these issues.

2 participants