Error when load testing web application: all pooled connections were in use or max pool size was rea

Discussion in 'ASP .Net' started by Allan Ebdrup, May 14, 2007.

  1. Allan Ebdrup

    Allan Ebdrup Guest

    I have a web application (ASP.Net V2) that fetches stuff from the database.
    I've created a test project in Visual Studio 2005.
    In the webtest I fetch data from some webservices that query the database.
    It responds in 0.02 to 0,10 seconds for the queries in the webtest (5
    queries).
    When I loadtest the webtest with 1 user and no wait time I get about 40
    responses, then I get the error:
    --------
    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.
    at
    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
    owningConnection)
    at
    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
    outerConnection, DbConnectionFactory connectionFactory)
    at System.Data.SqlClient.SqlConnection.Open()
    ....
    -----------

    In my dataaccess I use "using" on the connection everywhere I can (whenever
    I don't return a datareader)
    When I return a datareader I use CommandBehavior.CloseConnection
    And every place I fetch a datareader I use "using" on the datareader.

    So why do I get the error above? Is it because the connections can't be
    reused as fast as I am using them? Or must it be because I'm not closing my
    connections properly (I've checked everything twice, I'll check again).

    Kind Regards,
    Allan Ebdrup
     
    Allan Ebdrup, May 14, 2007
    #1
    1. Advertising

  2. Allan Ebdrup

    Allan Ebdrup Guest

    I just re-compiled my dll's and updated references again and the problem
    dissappeared.
     
    Allan Ebdrup, May 14, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vladimir Davidov

    "max pool size was reached" problem again!

    Vladimir Davidov, Nov 20, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    9,128
    +The_Taco+
    Nov 20, 2003
  2. dotNET Developer

    all pooled connections were in use

    dotNET Developer, Feb 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    8,802
    William \(Bill\) Vaughn
    Feb 24, 2004
  3. Bob
    Replies:
    2
    Views:
    570
    Angel Saenz-Badillos[MS]
    Feb 1, 2005
  4. Replies:
    5
    Views:
    392
  5. jobs
    Replies:
    1
    Views:
    5,263
    bruce barker
    Nov 10, 2007
Loading...

Share This Page