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

A

Allan Ebdrup

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
 
A

Allan Ebdrup

I just re-compiled my dll's and updated references again and the problem
dissappeared.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top