Sunday, March 11, 2012

CLR Stored Procedure is timing out

At one seemingly inoccuous step in my CLR stored procedure, execution stops and the query times-out.

I've tried debugging the stored proc by stepping into it from within VS. When I do, I get to the code in question, but then simply get this message:

WARNING: Debugger was accessing T-SQL variables while managed code was not suspended.
Waiting until the access is done to continue T-SQL execution.
Continueing T-SQL execution.


And these messages appear to repeat indefinitely. I'm running SQL Server locally on my machine, but this also happens on out development SQL Server server.

The place in the code it appears to happen is when returning back results from a lower-level CLR stored proc called within the higher-level CLR stored proc -- when piping the result set, I suppose.

I've set MAXDOP to 1. No help.

Anyone know what's going on?

Are the CPU and memory getting taken up more and more along with the message appears to repeat indefinitely?

Here is one thread with the same warning, it may be similar to your case:

http://forums.microsoft.com/technet/showpost.aspx?postid=780559&siteid=17

Suggest to move the thread to the forum .NET Framework inside SQL Server, there you will get rapid and qualified responses.

Thanks for your understanding!

No comments:

Post a Comment