We have a public front website that run fine most of the time. But we sometimes experience peaks of connections (like after a mailing campaign) and we were getting error like :
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
We are pretty sure that all our connections are closed properly (no connection leak).
So we decided to increase the number of connection allowed in the pool (which is 100 by default).
We increased it to 1000 (max pool size=1000;
in our connection string), and now our site can handle most peaks of connections. (I precise the site run on a dedicated server)
My question is : What may be the negative effects of the increase of the max connections pool ?
EDIT : Here's whats I have when I use sp_who2 during those peaks :
If max pool is set to 100, I have more than 100 lines of those 'awaiting command' lines :
SPID | Status | Login | HostName | BlkBy | DBName | Command | CPUTime | DiskIO | LastBatch | ProgramName | SPID | REQUESTID |
---|---|---|---|---|---|---|---|---|---|---|---|---|
number | sleeping | db_user | IIS pool name of my website | . | MyDatabaseName | AWAITING COMMAND | 0 | 0 | 05/10 14:48:59 | .Net SqlClient Data Provider | 137 | 0 |
And I can see that all 'LastBatch' were executed just a few second before.
using
in C#?