Learn how to a build a cloud-first strategyRegister Now


Connection Pool Timeout Issues

Posted on 2012-09-14
Medium Priority
Last Modified: 2012-09-17
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?  

Question by:ttist25
LVL 16

Accepted Solution

Rose Babu earned 1200 total points
ID: 38401418
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.
LVL 19

Assisted Solution

by:Manoj Patil
Manoj Patil earned 800 total points
ID: 38401488
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


Author Closing Comment

ID: 38405815
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.

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question