ASP.NET1.1 Timeout period elapsed prior to obtaining a connection from the pool.

  • Thread starter Thread starter Kamalanathan T.
  • Start date Start date
K

Kamalanathan T.

Hi,
We have developed an Web application in ASP.NET with C#
and we r using SQL Server 2000. We get the Timeout expired
error, when more than 300 concurrent users hit the site.


I hagone thru the code, to check whether all the
Connections are closed. everything is perfect, and infact
the connections are closed in the finally block.

Please, help me out ASPAP.

Error Details:

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.SqlClient.SqlConnectionPoolManager.GetPooledCon
nection(SqlConnectionString options, Boolean&
isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
 
Hi Kamalanathan,
This might be a far shot, but check to see if you are disposing off the
connection object. I doubt if the connection object is returned to the pool
if you just close the connection. So long as you hold a reference to a
connection, it will remain out of the pool.

Furthermore, you would not need to use the sqlConnectionPoolManager as
connection pooling is inherent in ADO when you use SqlConnection object. If
I remember right, it creates a connection pool by default of 100 connection
objects.

Hope this helps,

Regds,
Diwakar
 
Hi Diwakar,

Thanks for immediate reply.

If I call the Dispose() method, after the connection.Close
(), will the problem gets resolved?

Regards,
Kamalanathan T.
 
Yes. This should solve the problem.


-Diwakar

Kamalanathan T. said:
Hi Diwakar,

Thanks for immediate reply.

If I call the Dispose() method, after the connection.Close
(), will the problem gets resolved?

Regards,
Kamalanathan T.
 
Back
Top