SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


catch a sql server timeout exception


catch a sql server timeout exception

Author
Message
DBA-640728
DBA-640728
SSCrazy
SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)

Group: General Forum Members
Points: 2963 Visits: 2000
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.
CrazyMan
CrazyMan
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2942 Visits: 1597
Try profiler to run a trace and see how long does this SP runs every time, this might give you a clear idea
sturner
sturner
SSCertifiable
SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)SSCertifiable (5K reputation)

Group: General Forum Members
Points: 5016 Visits: 3259
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.
ChiragNS
ChiragNS
SSCertifiable
SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)

Group: General Forum Members
Points: 6571 Visits: 1865
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"
DBA-640728
DBA-640728
SSCrazy
SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)

Group: General Forum Members
Points: 2963 Visits: 2000
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 Sadthis is what i currently have)
remote query timeout (s) 0 2147483647 600 600

to:

sp_configure 'remote query timeout', 0
reconfigure

would this help?
ChiragNS
ChiragNS
SSCertifiable
SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)

Group: General Forum Members
Points: 6571 Visits: 1865
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"
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search