ThreadAbortException ifm. sql server clr function
Jeg har lavet en scalar sql clr function som benytter ICSharpCode.SharpZipLib til at komprimere et xml dokument. I næsten en måned har det kørt uden problemer i vores produktionsmiljø, men i dag begynder vi at få ThreadAbortExceptions i modulet som lagde vitale dem af miljøet ned. Er der nogen der har erfaringer med brug af sql clr functioner?Stacktrace:
EXCEPTION: KC.PRINT.ExceptionHandling.AMSDataException: Unknown DB error ---> System.Data.SqlClient.SqlException: A .NET Framework error occurred during execution of user-defined routine or aggregate "FN_Decode":
ICSharpCode.SharpZipLib.SharpZipBaseException: System.TypeInitializationException: The type initializer for 'ICSharpCode.SharpZipLib.Zip.Compression.InflaterHuffmanTree' threw an exception. ---> System.Threading.ThreadAbortException: Exception of type 'System.Threading.ThreadAbortException' was thrown.
--- End of inner exception stack trace ---
at ICSharpCode.SharpZipLib.Zip.Compression.InflaterHuffmanTree..ctor(Byte[] codeLengths)
at ICSharpCode.SharpZipLib.Zip.Compression.InflaterDynHeader.Decode(StreamManipulator input)
at ICSharpCode.SharpZipLib.Zip.Compression.Inflater.Decode()
at ICSharpCode.SharpZipLib.Zip.Compression.Inflater.Inflate(Byte[] buf, Int32 offset, Int32 len)
at ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Read(Byte[] b, Int32 off, Int32 len)
ICSharpCode.SharpZipLib.SharpZipBaseException:
at ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Read(Byte[] b, Int32 off, Int32 len)
at ICSharpCode.SharpZipLib.GZip.GZipInputStream.Read(Byte[] buf, Int32 offset, Int32 len)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.ReadToEnd()
at SqlFunctions.Decode(SqlString input)
.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.HasMoreRows()
at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.Read()
at KC.PRINT.MsSqlDALImpl.MsSqlDALImpl.GetDocumentBatch(GetDocumentRequestType getDocumentRequest) in d:\CCNetWrkDir\AMP_2010-04.HF\1032_Print\Archive\KC.PRINT.MsSqlDALImpl\MsSqlDALImpl.cs:line 1590