jackrabbit icon indicating copy to clipboard operation
jackrabbit copied to clipboard

Fix memory leak: delete pending reply callback after reply

Open kyh opened this issue 6 years ago • 3 comments

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

kyh avatar Jun 21 '19 06:06 kyh

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.

matmar10 avatar Jun 22 '19 04:06 matmar10

Yep I'll take a look this weekend

kyh avatar Jun 22 '19 21:06 kyh

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

kyh avatar Jun 24 '19 23:06 kyh