fullstackhero / dotnet-starter-kit

Production Grade Cloud-Ready .NET 8 Starter Kit (Web API + Blazor Client) with Multitenancy Support, and Clean/Modular Architecture that saves roughly 200+ Development Hours! All Batteries Included.

Home Page:https://fullstackhero.net/dotnet-webapi-boilerplate/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

image

Finally I found the problem which is caused by .Enrich.WithExceptionDetails()

image