How to catch application timeout? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to catch application timeout?

Hello, once in a while, our application will receive timeout error. When I was being notified by the users (a few minutes later), everything already went back to normal and I couldn’t tell what heppened…… My questions: 1. Can I use Alert or anything else to catch application timeout?
2. How? Thanks a lot!

The simplest way would be to do it from the client side – catching the exceptions as they occur and logging them together with the actions (code/query) that the client had sent to the database server. Nathan H.O.
Moderator
SQL-Server-Performance.com
May also take help from thishttp://vyaskn.tripod.com/watch_your_timeouts.htm link to resolve the issue. _________
Satya SKJ
Moderator
SQL-Server-Performance.Com

Yes, the application do catches the error. However, it only catches the error for the timeout processes. In this case, I still cannot tell what causes everything else to time out. I guess I ask the wrong question. My question should be, how can I catch the process that is holding up other processes? Thanks!
Use Who and Who2 from SQL Analyzer.
Luis Martin …Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
Bertrand Russell
By the time I ran sp_who, everything is already clear. That is my problem. Therefore, I was thinking if there is an Alert or somehting that can inform me right away when things happened. Thanks!
Try this sql stmt that should track "trouble-makers".<br /><br />I got this idea after reading one of the issues of sql magazine. I forgot the author’s name [<img src=’/community/emoticons/emotion-2.gif’ alt=’:D‘ />]<br /><br />Anyway, here it is:<br />SELECT <br />spid, cmd, status, loginame, open_tran, <br />datediff(s, last_batch, getdate ()) AS [WaitTime(s)]<br />FROM master..sysprocesses p<br />WHERE open_tran &gt; 0<br />AND spid &gt; 50<br />AND datediff (s, last_batch, getdate ()) &gt; 30<br />ANd EXISTS (SELECT * FROM master..syslockinfo l <br />WHERE req_spid = p.spid AND rsc_type &lt;&gt; 2)<br /><br />Jon M<br /><br />I believe the author is Kalen Delaney.
Thanks to all of you!!
]]>