Closed ukgrant closed 6 years ago
details pls!
I have an aspnet core web application which I am registering the MQTTServer in the startup class constructor. Calling the PublishAsync method numerous times, causes the memory consumption of the application to climb pretty quickly without being freed. This only occurs if there is a client connected. Is there a better way for me to achieve this? If there are any specific details, I can give you, let me know.
Thanks
can you take a memory snapshot with visual studio diagnostics and highlight the classes that consume the memory. im using the mqtt server with 1000 msg/sec and have constant 50 mb total memory usage.
@JanEggers how big are the message payloads with the 1000 msg/sec scenario?
Probably this issue is related to #130.
I am also experiencing a memory leak with version 2.6.0.
I wrote a simple stresstest that sends 7500 Messages with a Payload that consits of 2000 characters. (and a client that receives these messages). It does not matter if i sent the messages with an managed or unmanaged client. The memory usage of the server climbs steadily and never drops.
@Tyrannmisu if you have a repro please share the code and or make a memory snapshot from visual studio so we can see what is wrong.
Sry, i wansn't able to get back to the topic until now. I won't be able to share any sources or repositories but i can upload a memory dump: Broker.zip
This test was done by sending 4000 messages with a payload that consits of 1000 characters. The memory usage climbed from around 9Mb to ~16,5MB and never dropped. I am able to reapeat this and even reach a memory consumption of 200MB and more.
Unfortunatly i could not upload the dump that also contains the heap because the file has a size of 160MB.
Edit: Additional info: Encoding was UTF8, retain ins false and QoS was AtMostOnce
I released a preview of version 2.7.0 (nuget). Please let me know if this version has no longer a leak. We fixed several issues which are blocking threads and memory. Best regards Christian
I know the issue is already closed, sry that i was not able to resdpond until know. The memory usage seems to be much better, i will have to do some more testing to assure that the leaks are gone.
But it looks good for now.
The following code causes a memory leak when publishing messages within a ASP NET Core application. How should I be configuring this library in core?