ThreadAbortException

H

Hans Reins

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)
 
K

Karl Seguin

If your IIS and SQLServer are on the same machine, and it's under high load,
it could be that your worker process is recycling. There are a number of
reasons why the worker process would recycle...such as memory constraints,
idle constraints, absolute times and so on. I wouldn't expect it to abort
so violently, but if it's trying to recycle and a thread is preventing it
from doing so for 15 minutes, then I could see how it would decide to do
that...

anyways, are they on the same box? if so check out:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config (path
might be different on other OS (WinNt)

and look at the <processModel section..you'll see all the cases in which
the worker process would recycle

Oh ya, and don't play with that file in production, you could mess things
up.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top