Reputation: 2575
We have been getting this Oracle connection pool exception a lot recently for our ASP.NET website. This is the detailed exception message:
Timeout expired. 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.
This is our connection string
User ID=user1;password=password1;DATA SOURCE=Datasource1
Can you tell me how to set max pool size to 1 so that I can debug it on my local?
Another question is: what is the recommended pool size for a website with 10,000 users? and if max pool size is reached, how to fail gracefully?
Thanks a lot!
Upvotes: 2
Views: 12117
Reputation: 45295
I have used such connection string to set the connection pool size:
const string connString = "server=localhost;" +
....
"Min Pool Size=3;" +
"Max Pool Size=3";
But you don't need to set connection pool size bigger. Such error message I have got when I forget to close connections. Check your code to find places where you open connections, but don't close them. It can help you.
Upvotes: 2