Closed mniak closed 4 years ago
Hi @mniak - thanks for reaching out.
Can you please "break" your debugger when the problem occurs, and post some details of what threads are in the Serilog assemblies at that point? Would be great to track this down, if it's a Serilog issue 👍
Your logger configuration (code and/or config) would also help identify/rule out some possibilities.
Thanks!
Hi, I finally found the problem, and it is not a bug in the Serilog code.
I will describe it here to help people that can have this same behavior:
I was providing period
with TimeSpan.Zero
by accident.
It is also worth mention that the code in this repository already has a check for TimeSpan.Zero
since PR #34. The reason that my code did not report this is because i was using Serilog.Sinks.PeriodicBatching@2.1.1
as a transitive dependency of Serilog.Sinks.AzureEventHub@4.1.0
The only thing that still does not make sense for me is why the timer is still on even while there is no remaining messages to be sent in the batch?
I will open a different issue to address this.
Thanks.
When I use this sink, the CPU consumption increases significantly even without any logs being recorded.
I also found a report of a developer having the same problem: https://github.com/serilog/serilog-sinks-elasticsearch/issues/137
Framework: .NET Core 2.2