Back

Fix EF Core Connection Leak Causing Pool Exhaustion

Problem

Your ASP.NET API randomly hangs under load. EF Core DbContext is being reused incorrectly, causing connection leaks. Fix the lifetime and disposal problem.

Code Editor