The timeout period elapsed prior to obtaining a connection from the pool

Posted on 2011-10-09
Last Modified: 2012-05-12
We have a web site running on .net + sql server. Recently we are getting the below 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. Inner Exception:>>"

It occured not very often. 4,5 times in the last year. The website will return to normal after restarting IIS.

This error clearly states that applicaiton pool have reached the max pool size and it does not have any more connection left for the application to be made to SQL Server.

We doubt that in the code, database connections are being opened but never closed. However, after examining some suspecious moduels, we could not find any of this type of connection. All connections are closed properly.

Is there any way to trouble shoot this problem or to locate the exact problematic point?
Question by:SGSCTC
    LVL 10

    Expert Comment

    I use IISPeek to determine what is using resources on the webserver in real time.

    Author Comment

    how about IISPeek's impact on the performance? We need to make sure production enviornment won't be affected by our monitoring.  

    any other suggestions? I need to find a way to locate where it goes wrong.  
    LVL 10

    Expert Comment

    IISPeek's impact is negligible.  It will enable you to find out if there's a page spinning and hanging up your application pool.  It consumes less than 3%CPU and under 100MB RAM when I run it.

    I don't know of another solution that would give you the information you need.
    LVL 17

    Accepted Solution

    I know this is old but you have misunderstood the error message.

    This has nothing to do with IIS application pools as you thought  and IISpeek will not help here.

    It is to do with connection pools to the database. Connection pools are database terminology and they will differ which DB you are using.

    Look at the db end to see the connections being exhausted.

    For the question "request attention" and add more zones for the database technology you are using. for more detailed help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
    If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now