Serilog High Memory Usage - Memory Leak & Solution [BUG]
Diyar opened this issue · comments
Upon investigation, I observed that when I send a request to EF Core and encounter a failure or exceptions from the database, the process takes a longer time and consumes a significant amount of memory.
Interestingly, after removing Serilog from the project, the issue disappeared, and EF Core promptly sends the response without delays.
I tried this: I sent an create request with duplicate Id then the problem appeared.
you can see following screenshot:
Finally I found the problem which is caused by .Enrich.WithExceptionDetails()