Open ilya-chumakov opened 2 years ago
Thanks @ilya-chumakov. I found this problem in our production server too. But I couldn't solved by your codes... Finally, I changed serialization library from MsgPack.Cli to MessagePack for C# and confirmed the memory leak is fixed.
I sent my fix as PR #23. I don't published fixed version as nuget package yet because I want to fix original version. (I published only GitHub package for our project.)
Maybe My PR is not checked... But I found that klyse/serilog-sinks-fluentd merged it. I will try to use Serilog.Sinks.Fluentd.Revived package.
We found a serious memory leak on sending logs to the collector. As the project is dead (no PR accepted in recent years) and because of other serious issues like this, a quick fix could be: 1) fork it 2) fix https://github.com/borisermakof/serilog-sinks-fluentd/blob/0ca957c9156229bb1e480def9f70ec35acb8e993/src/Serilog.Sinks.Fluentd/Sinks/Fluentd/FluentdEmitter.cs to
BTW, the serializer used there is also dead :)
I do not intend to publish a nuget package with this fix or open my fork and I recommend you to do the same. This lib has too many existing flaws. In my opinion, it has to be re-written from scratch using a different MskPack serializer to get a stable production-ready solution.