catch a sql server timeout exception

  • hello i have a application(biztalk) that executes a stored procedure automaticaly from my sql server. From time to time i get this error Error Description: Microsoft.XLANGs.Core.XlangSoapException: AN_EXCEPTION_HAS_HAPPENED_Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

    is there any way to catch this error of why this is happening, i checked sql server's log , i don't see any deadlocks, no jobs running at that time, no other heavy transactions either. When i execute this sp manually i see it only takes a few seconds to run, that's why i don't see what can the problem be.

  • Try profiler to run a trace and see how long does this SP runs every time, this might give you a clear idea

  • Sounds like the query timeout value should be increased. What other activity is going on on the server during the time the SP is executed by the application? Queries that run fine under no load can take forever under heavy load.

    See if you can optimize the query(s) in that SP would be the first thing I would do. After that, I'd look at the query plan(s) and see where you can optimize the SQl and/or indexing to speed things up.

    Last but no least, you may just need more memory for your server so it can provide better performance during these heavy load times.

    The probability of survival is inversely proportional to the angle of arrival.

  • Create a trace, put the output of the trace in a file and run the trace. This is uses lesser resources than running the trace on profiler. Also set the DBCC Traceon statement to record any deadlock information on the SQL logs.

    "Keep Trying"

  • thank you, i will definetely try all your advise, i do have the

    DBCC TRACEON (3604)

    DBCC TRACEON (1204)

    but i do not see any deadlocks in the sql log , by doing some reasearch i read that it would be good to change my remote query timeout configuration from :(this is what i currently have)

    remote query timeout (s)02147483647600600

    to:

    sp_configure 'remote query timeout', 0

    reconfigure

    would this help?

  • Changing the query time out may help but its better to find out the reason and solve it. You will make sure that it will not come back again.

    "Keep Trying"

Viewing 6 posts - 1 through 5 (of 5 total)

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