Connection Pool Timeout Issues

Hey guys,

I'm having some trouble with an ASP.NET app and my programmer is on vacation.  Yay!

I've got the app running on a number of different servers without issue but this specific instance is on a very locked down Windows 2008 Server Standard edition VM.  I have been granted local admin rights and I have a Windows SQL Server 2008 Enterprise R2 installation (which I upgraded from SQL Server 2008 Enterprise).  I can access the database from SSMS and query data in the tables logged in as SA so everything seems to be working correctly as far as that goes but I'm having trouble from the application.

My connection string is as follows:
connectionString="Data Source=localhost\MSSQLSERVER;Initial Catalog=MYDB;Connection Timeout=0;Persist Security Info=True;User ID=sa;Password=mypassword"

I'm getting the following error with the default configuration (which is working on my other servers):

"Timeout expired. The timeout period elapsed prior to connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached."

The Exception Details:
"System.InvalidOperationException: 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."  

The Source Error comes from a line in the .vb file of the page I'm trying to load.  The specific line that's highlighted is:

I think that's getting values from the database to populate a dropdown list box (not positive - again programmer is on vacation).  

Any ideas what I should be looking at?  

Who is Participating?
Rose BabuConnect With a Mentor Senior Team ManagerCommented:
can you try to update the connection string with timeout value and alos with pool size like below?

connectionString="Data Source=localhost\MSSQLSERVER;Initial Catalog=MYDB;Persist Security Info=True;User ID=sa;Password=mypassword;pooling='true'; Max Pool Size=1000; Connection Timeout=10"

Try with this connection string and test once.
Manoj PatilConnect With a Mentor Sr. Software EngineerCommented:
I also had the same problem about connection pool... So I follow the instructions given in below link. And after that this error didn't came again....

For more details check this
ttist25Author Commented:
Thanks guys.  

I made the connection string changes recommended by srosebabu and ended up with a new error (error:25 invalid connection string).  When I researched that error I found that someone was able to fix it by removing the default instance name from the connection string.  I did that and it fixed it.  

I have since changed the connection string back to the original settings except that I have left the instance name out and it still seems to be working.  I don't really understand why it's not giving me the timeout waiting for a connection from the pool but, it is working.  

Thanks again for your help.  I'll update this if I run into issues again.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.