Editorial question142K views4,021 votes0 answers3,241 following
AI-generatedConnection pool exhaustion with EF Core DbContext connection lifetime
Understanding when EF Core acquires and releases a physical database connection relative to DbContext lifetime and per-command execution is needed to reason about intermittent pool exhaustion. The documented interaction between DbContext connection management, SaveChanges and provider pooling is relevant, as is the effect of holding a DbContext instance acro