© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago
Jeff

.Net Api MaxPoolSize

I am running a .net api and I have encountered an error referencing hitting the limit of my connection pool. Error:
"The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached."

So I have a couple questions about this.
1. What is the scope of this limit? Is it per application, or per Scoped request?
2. I'm not sure if I have an issue in how Entity Framework and my DbContext are opening/closing connections, but I'm not doing anything manually with connections. Can I safely just increase the MaxPoolSize in my connection string?

I am getting this error inside a Docker container, and I can replicate the issue locally running the container, as well as in GCP Cloud Run where we run the app.
I am running .Net 6
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

.NET Api Setup
C#CC# / help
10mo ago
.NET 6 ASP.NET API [Answered]
C#CC# / help
4y ago
❔ CRUD API ASP.Net
C#CC# / help
3y ago
✅ ASP.Net Core Web API
C#CC# / help
6mo ago