ThreadAbortException throws OdbcDataReader.ExecuteReader ()

I am using an SQL query for a DB2 mainframe database using the OdbcDataReader class and the ExecuteReader () method. This code is in production and works fine for several months.

Usually the request takes 1-2 minutes. Last Friday, a ThreadAbortException was thrown in the request. The following is a formatted stack trace. A ApplicationException in the trace is thrown in my catch block.

In case this is important, the request is executed when the client calls the web service method. The web service is hosted on a Windows service. The web service is hosted on a Windows service using the soap.tcp protocol.

Any ideas why a TreadAbortException is occurring?

Stack trace for 2 exceptions. Enter the root at the top.

Exception 2: the stream is interrupted.
System.Threading.ThreadAbortException inside C: \ WINDOWS \ assembly \ GAC_64 \ System.Data \ 2.0.0.0__b77a5c561934e089 \ System.Data.dll in System.Data.Common.UnsafeNativeMethods.SQLExecDirectW (OdbcStatementHandle StatementHandle, String Statement System.Data.Odbc.OdbcStatementHandle.ExecuteDirect (String commandText) in the System.Data.Odbc.OdbcCommand.ExecuteReaderObject (CommandBehavior behavior, String method, Boolean requireReader, Object [] methodArguments, SQL_API odbcApiMethodbd.Doc.dm.bd.doc.doc.dmdbc.doc ExecuteReaderObject (CommandBehavior behavior, String method, Boolean needReader) in System.Data.Odbc.OdbcCommand.ExecuteReader (CommandBehavior behavior) with MyCompany.MyDatabase.GetFolioList (String sqlWhereClause)

1: , STAT_CD = 'V'.
System.ApplicationException D:\\DBGateway\Bin\MyDatabase.dll MyCompany.MyDatabase.GetFolioList(String sqlWhereClause) MyCompany.MyDatabase <. > C__DisplayClass18.b__17() MyCompany.WebUtilities.WebServiceBase.WebMethodTemplate [] ( methodName, String exceptionFormat, WebMethodWorker 1 Worker, StringFormatter 1 FormatterMethod)

+3
2

.

- , -. , ThreadAbortException. - .

- WSE3, ASP.NET, . soap.tcp(, ), - executeTimeoutInSeconds:

<configuration>
  <microsoft.web.services3>
    <messaging>
      <executionTimeoutInSeconds value="360" />
    </messaging>
  </microsoft.web.services3>
</configuration>

-, ASP.NET, - Timeout:

<configuration>
<system.web>
            <httpRuntime executionTimeout="360" />
      </system.web>
</configuration
+3

, , , , .

ThreadAbortExceptions , , CLR, . ? ( Sql Server, .)

0

Source: https://habr.com/ru/post/1699679/


All Articles