So, I am looking to increase the Max Pool Size. The problem is that I don't know what a "reasonable" increase would be. Right now I am not setting it, just using the default of 100. The following are my more specific questions:
Why is this number defaulted at 100, seems low. What are the negatives of significantly raising it to 1000 or something like that?
Is there a good way to determine what this Max Should be raised to?
What is the "scope" of the Connection Pool? Is this pool all connections to the database? Each "Machine/Server" connecting has is own Pool?
Background:
While my application is running we received the following error:
"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." I have read alot of other post with a similar problem, all of which discuss how I should do one of two things.
I have an extremely large application, so the (1) is hard to determine if somewhere a connection is not being closed. I can't find one that is not.
Why is this number defaulted at 100, seems low.
100 connections roughly means that you can handle two hundred 500ms database processings per second on every second without running low on connections. That's quite high. If you hit this limit, it's time to have a look at optimization.
What are the negatives of significantly raising it to 1000 or something like that?
Is there a good way to determine what this Max Should be raised to?
On a rough basis, it should be the number of connections you will need per second times the average execution time necessary before releasing each connection. For example, if you need to open one hundred new connections per second, each of them requiring 10 seconds before release (which would be really huge), you would need something like 1000 connections in your pool to handle it on the long run.
What is the "scope" of the Connection Pool?
I would say it is on the AppDomain (will check that)
Is this pool all connections to the database?
Connections are pooled based on connection strings. Any small difference in the connection strings will lead to different pools (though I'm not sure if it is case sensitive)
Each "Machine/Server" connecting has is own Pool?
About your problem, it might be several things :
Select @@MAX_CONNECTIONS
) That seems unlikelyIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With