Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Connection pooling

Posted on 2004-11-01
Medium Priority
Last Modified: 2012-05-05
I'm using C# & ASP.NET. When i create a loop/refresh page ... after 99 times i get

"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. "

So my connection pool is full, but how can this be ?!  I created an empty page and only used these 2 code snippets. What am i doing wrong.

SqlDataAdapter oDataAdapter = new SqlDataAdapter("select * from users",
                                    "user id=sa;password=xxx;Initial Catalog=xxx;Data Source=(local)");
                              DataSet oDataSet = new DataSet();
for(int i =0;i<105;i++)
                        using (SqlConnection oConn = new SqlConnection("user id=sa;password=xxx;Initial Catalog=xxx;Data Source=(local)"))
                              SqlCommand oCommand = new SqlCommand("select * from users");
                              oCommand.Connection = oConn;
Question by:zinno
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Author Comment

ID: 12467971
In my project settings, I had SQL Server debugging enabled. I turned that off and the problem went away.

Accepted Solution

CetusMOD earned 0 total points
ID: 12468057
Question PAQ'd
250 points refunded.

Community Support Moderator

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

618 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