Best way to identify application timeouts

  • Every once in awhile our application is getting timeouts(not to be mistaken with deadlocks). I have turned on sql server trace flags to write to the error log to capture deadlocks but we are not getting deadlocks. I'm thinking the application is timing out before the deadlock actually occurs. I have also run a sql profiler trace(i.e. Long Duration) to identify long running queries. Does anyone have another idea in identify what is causing the timeouts? I really don't know of a way to identify this without tuning every long running query that the sql profiler long duration trace identifies.

    Thanks in advance for any suggestions.

  • Maybe you can be experiencing network problems!

  • What do you see on your SQL Error logs?

  • Nothing pretaining to deadlocks or any other errors. I think the application is timing out the customer before sql takes a deadlock because I have a flag turned on to write to the error log

  • ericwenger1 (8/30/2011)


    Every once in awhile our application is getting timeouts(not to be mistaken with deadlocks). I have turned on sql server trace flags to write to the error log to capture deadlocks but we are not getting deadlocks. I'm thinking the application is timing out before the deadlock actually occurs. I have also run a sql profiler trace(i.e. Long Duration) to identify long running queries. Does anyone have another idea in identify what is causing the timeouts? I really don't know of a way to identify this without tuning every long running query that the sql profiler long duration trace identifies.

    Thanks in advance for any suggestions.

    If it's an ASP.Net app check the connection pools in your web.config and make sure you don't have more users connecting in than you have connections. We ran into this where we had more connections than pools and some users weren't getting connected to SQL which would give them timeouts.

    The way I diagnosed this was getting the number of connection pools set in web.config and when timeouts started to occur ran sp_who2 on the SQL server to see if the number of connections matched which it did. Increasing the connection pools in web.config on the app fixed the problem.

    You may also have open connections in the application not being closed which will cause many more connections than users. This is a nightmare to fix in an established application, we had to do this in one of our apps last year just to improve performance, but it's something to be mindful of.

    Hope this helps --

    Sam

  • Did Sam's tips help you out?

  • I have checked the connection pools on web.config or whether the application is leaving open connections but this is something that we have not explored and will definately do so! Thanks to both of you for your help!

  • If the application is timing out, you should get an "Attention" event in Profiler.

    Couple that with other profiler events (e.g. your long running queries one... look for long running queries that finish after the attention event), and that might help you trace the cause.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply