Open robertsLando opened 4 years ago
I think there is a memory leak in mqemitter-mongodb under high load, and it lives here: https://github.com/mcollina/mqemitter-mongodb/blob/798d191ce36e6ac8dac39a3b8d1713aba632bba2/mqemitter-mongodb.js#L170-L215. Last time I checked, I was not able to track it.
I think that error could cause some message lost but not what I’m sepaking about, am I wrong?
Daniel - Software Engineer
Support me at: Github sponsors
On 29 Apr 2020, at 12:26, Matteo Collina notifications@github.com wrote:
I think there is a memory leak in mqemitter-mongodb under high load, and it lives here: https://github.com/mcollina/mqemitter-mongodb/blob/798d191ce36e6ac8dac39a3b8d1713aba632bba2/mqemitter-mongodb.js#L170-L215. Last time I checked, I was not able to track it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I think whenever a message is lost it leaks memory.
Are you speaking about this line? https://github.com/mcollina/mqemitter-mongodb/blob/798d191ce36e6ac8dac39a3b8d1713aba632bba2/mqemitter-mongodb.js#L213
Could we instead of using mongodb object id use a simple incremental id?
I don't think it would change the problem. I don't think that callback is called when a message is missed.
This error afetr 1 minute running a benchmark against aedes with mongodb backend (it happens both with and without clusters). Thoughts @mcollina ?
Seems the bottle-neck is mongodb
insert
method.If I use aedes-persistence-mongodb with mqemitter-redis everything works fine and performances are even better then using only redis persitence.
It even works with mqemitter-mongodb paired with aedes-persistence-redis but with worse performances
I think mqemitter-mongodb and aedes-persistence mongodb needs some thoughts about a way to optimize inserts in order to fix this