ASP.NET/Timeout expired
Expert: Srini Nagarajan - 11/21/2011
QuestionSrini,
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.
AnswerHi,
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