Hello,

recently I have encountered with the strange issue concerning
ThreadAbortException that throws DbDataAdapter.Fill (see below the
stacktrace [1]). At the first time I suppose that this problem due to
Command.Timeout property that was set too small, but to tell the truth
it has the maximum value - 65534 and this exception throws after 10-15
minutes of execution of Stored Procedure.

Also I've noticed that the problem completely relates to SQL server when
it was really loaded (about 99% of processor usage). So my question is
how can I detect what causes this exception (and how to prevent it) - if
it is SQL server, is it possible to modify properties of SP execution
timeout or something?

All kind of information would be really helpful.

Thanks!

[1] Stacktrace:
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean
returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior
behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data,
Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

Re: ThreadAbortException from DbDataAdapter.Fill by Mary

Mary
Thu Jun 02 08:19:59 CDT 2005

Have you put a Profiler trace on it yet? That's the best way of
determining what's going on at the server. The stored procedure code
(which you haven't included) could also be the source of the problem,
not your client code. You'll need to examine the trace to
troubleshoot.

--Mary

On Mon, 30 May 2005 15:34:51 +0300, Hans Reins <hans@reins.com> wrote:

>Hello,
>
>recently I have encountered with the strange issue concerning
>ThreadAbortException that throws DbDataAdapter.Fill (see below the
>stacktrace [1]). At the first time I suppose that this problem due to
>Command.Timeout property that was set too small, but to tell the truth
>it has the maximum value - 65534 and this exception throws after 10-15
>minutes of execution of Stored Procedure.
>
>Also I've noticed that the problem completely relates to SQL server when
>it was really loaded (about 99% of processor usage). So my question is
>how can I detect what causes this exception (and how to prevent it) - if
>it is SQL server, is it possible to modify properties of SP execution
>timeout or something?
>
>All kind of information would be really helpful.
>
>Thanks!
>
>[1] Stacktrace:
>at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
>cmdBehavior, RunBehavior runBehavior, Boolean
>returnStream)
> at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
>behavior)
> at
>System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior
>behavior)
> at System.Data.Common.DbDataAdapter.FillFromCommand(Object data,
>Int32 startRecord, Int32 maxRecords, String
>srcTable, IDbCommand command, CommandBehavior behavior)
> at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
>startRecord, Int32 maxRecords, String srcTable,
>IDbCommand command, CommandBehavior behavior)
> at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)