-
Notifications
You must be signed in to change notification settings - Fork 212
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 when QoS > 1 #56
Comments
This is definitely a bug. I can reproduce the effects on my machine with the above code. I believe the reason behind this is the way This is what alanxz/rabbitmq-c#5 is supposed to solve (for a variety of reasons I don't think I will end up merging that PR). I think in this case however, I don't think even that will help, as this is all happening in one channel. I think the 'solution' is: internally when reading frames we need to try hard to immediately use all of the frames that rabbitmq-c generates so that the memory pool can be recycled. |
The problem exists when there is only one channel. If I use seperate channels for consume/ack and publish memory pool is recycled just fine. But that's just a workaround not a solution. |
Interesting. Given what I think the problem is - I would not have expected separating out publish and consumer to their own Channel objects would've alleviated the memory issue. But I'm glad you found a workaround for the moment. |
Attempt to assemble envelopes frames are added to the internal frame queue. This will allow memory to be more readily freed, and prevent unbounded growth of memory where QoS > 1. This should solve issue #56 completely.
Attempt to assemble envelopes frames are added to the internal frame queue. This will allow memory to be more readily freed, and prevent unbounded growth of memory where QoS > 1. This should solve issue #56 completely.
Attempt to assemble envelopes frames are added to the internal frame queue. This will allow memory to be more readily freed, and prevent unbounded growth of memory where QoS > 1. This should solve issue #56 completely.
Hello,
When using prefetch count higher than 1, I experience memory leak.
Am I missing something or is this a bug?
The code below allocates memory and never releases it, and eventually system crashes.
The text was updated successfully, but these errors were encountered: