Reputation: 638
We are receiving this exception from one of our sql select statements. I cannot find error 3617 in the sysmessages table. The .Class is 25. There is no message.
We know we are getting it on Sql server 2005 servers.
I do know that this is large select that joins several tables and uses the CLR to combine and order some data.
What could be causing this error or where I could find out what the error code means?
Upvotes: 1
Views: 1870
Reputation: 7274
Take a look at this: Discussion on Microsoft forums, see the answer from the moderator last in the post.
Updated: (added text from forum post):
Error code 3617 is a system attention. A system attention occurs when the client cancels a running request. This can happen if the command times out for example. This error is normally not sent to the client however.
There is a special case where this can occur that you may be hitting. When you re-use a pooled connection, the first outbound request sends a special bit flag on the request to tell the server to reset the connection state prior to executing the request. This bit causes the server to first clear connection state, then execute the command. If your SQL Server is under heavy load, and this bit is set, and it takes a long time to reset the connection state, the client may timeout and send the system attention. This causes the reset of the connection to be cancelled and in this case you can see the 3617 sent to the client.
We've recently hardened this code in current release to avoid sending back this specific error code as the error is spurious in nature (based on timing you may or may not get this error). In any case, you can consider this error equivalent to: "A severe error occurred on the current command. The results, if any, should be discarded. Operation cancelled by user."
To verify if it is this issue, examine your SQL errorlog for error like below:
spid51 Task abort was requested while attempting to reuse a session with SPID 51, which has been reset for connection pooling. The session will be terminated.
Upvotes: 2