ASP.NET/Timeout expired

Advertisement


Question
Srini,

I have a intranet website that just went online and written in C# ASP.NET using SQL Server 2008 as the database.  All was working fine unitl I recently got the following error:

Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool. This may have occured because all pooled connections were in use and max pool size was reached.

After alot of searching on the net I could not find out how to trouble shoot the connection problem.  I had to stop IIS and all seemed to work after that.

I understand that this issue is probably related to connections not being closed in an ASP.NET appliation.  My question is how do I track this down.  How can I look at the connections that are open but no process attached.  I am not the only author of this website code.  It could be someone elses code that is causing this issue.  I am looking for troubleshooting techniques or tools to help isolate this isssue and to verify the root cause of the problem.

Any help would be greatly appreciated.

Answer
Hi,

This is big issue on asp.net database.  you code need to be perfect.  Check the following code which gives you some idea how to track and monitor leaked connection and fix it for you.

http://www.codeproject.com/KB/database/connectionmonitor.aspx

Cheers

-Srini

ASP.NET

All Answers


Answers by Expert:


Ask Experts

Volunteer


Srini Nagarajan

Expertise

I can answer any questions on ASP.NET on any version. I have more than 10 years of exp.

Experience

asp.net, c#, vb.net, SQL Server, Oracle

Organizations
better not to disclose

Education/Credentials
post graduate

©2012 About.com, a part of The New York Times Company. All rights reserved.