- Notifications
You must be signed in to change notification settings - Fork615
Heap memory contains 6.3 million of string objects like this: amq.ctag-QyDNazNXZdatTGscA8QWrw#1797
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Describe the bugHello, everyone. I have multiple microservices that communicates each other with RabbitMQ. I have discovered that my application is having high memory usage that keeps growing. I have analyzed its dump and I found that, on the heap memory, I have 437 MB used by around 6.3 million of string objects like this: This is the consumer tag. I am not storing it on the heap, it's just within the local scope in a string variable, so I am pretty sure the Garbage Collector will dispose it. I am creating a consumer for each RPC request, like this: And cancel it like this: From my research, it seems the consumer was disposed but not its handler and that's why its tag stays in the memory. Could you please confirm that is the case? Also, should I replace with Thank you! |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 2 comments
-
This repository is about the server side, so RabbitMQ as a broker. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
@gabrieltarpian25 - I've moved this issue to the correct repository. You are missing basic information in your issue report:
Once you provide the above, I can assist you. Other notes: Yes, that is the correct way to remove an event handler in C#.
How am I supposed to confirm this without seeing how you use this library? After a quick review I can't see where this library would hold on to a consumer tag for a long period of time in |
BetaWas this translation helpful?Give feedback.
All reactions
This discussion was converted from issue #1797 on February 26, 2025 15:11.