Thread was being aborted Errors

G

Guest

Hi,
I have a web app that is intermittently throwing "Thread was being aborted."
errors in my data access component. This seems to occur when the app is under
a heavier than normal load.
I would have thought if the DB call was timing out I would get a timeout
error.
This is a sample of the exception details I'm getting:

System.Threading.ThreadAbortException: Thread was being aborted.
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)
at NCSUtilities.DataAccess.ExecuteDataset(SqlConnection connection,
CommandType commandType, String commandText, SqlParameter[] commandParameters)
at NCSUtilities.DataAccess.ExecuteDataset(String connectionString,
CommandType commandType, String commandText, SqlParameter[] commandParameters)

Any ideas on how I could identify the cause or how I could resolve this
would be greatly appreciated.

Thanks,
Keith F
 
A

Angel Saenz-Badillos[MS]

Keith,
I would expect a timeout error too, in fact I would trust the exception and
look for a reason why the thread abort could be happening. If you are using
asp.net there is a default (and settable) timeout of three minutes, there
are also other forced thread aborts linked to resource utilization etc.

--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging about ADO.NET: http://weblogs.asp.net/angelsb/




Keith F. said:
Hi,
I have a web app that is intermittently throwing "Thread was being aborted."
errors in my data access component. This seems to occur when the app is under
a heavier than normal load.
I would have thought if the DB call was timing out I would get a timeout
error.
This is a sample of the exception details I'm getting:

System.Threading.ThreadAbortException: Thread was being aborted.
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(Comman
dBehavior 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)
at NCSUtilities.DataAccess.ExecuteDataset(SqlConnection connection,
CommandType commandType, String commandText, SqlParameter[] commandParameters)
at NCSUtilities.DataAccess.ExecuteDataset(String connectionString,
CommandType commandType, String commandText, SqlParameter[] commandParameters)

Any ideas on how I could identify the cause or how I could resolve this
would be greatly appreciated.

Thanks,
Keith F
 
G

Guest

Angel,
Thanks for your response.
I tried bumping up the script timeout setting in IIS for this site to 180
seconds but it doesn't seem to have resolved the issue. Could you tell me if
there is a difference between setting the script timeout property in IIS
through the IIS managment console and the httpRuntime Attribute
"executionTimeout" in the machine.cofig file?

I'm also trying to figure out if this is being caused by the database server
or the web server.
Could you elaborate more on your last statement: "there are also other
forced thread aborts linked to resource utilization etc." ? And possibly what
to look for?

Thanks, Keith


Angel Saenz-Badillos said:
Keith,
I would expect a timeout error too, in fact I would trust the exception and
look for a reason why the thread abort could be happening. If you are using
asp.net there is a default (and settable) timeout of three minutes, there
are also other forced thread aborts linked to resource utilization etc.

--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging about ADO.NET: http://weblogs.asp.net/angelsb/




Keith F. said:
Hi,
I have a web app that is intermittently throwing "Thread was being aborted."
errors in my data access component. This seems to occur when the app is under
a heavier than normal load.
I would have thought if the DB call was timing out I would get a timeout
error.
This is a sample of the exception details I'm getting:

System.Threading.ThreadAbortException: Thread was being aborted.
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(Comman
dBehavior 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)
at NCSUtilities.DataAccess.ExecuteDataset(SqlConnection connection,
CommandType commandType, String commandText, SqlParameter[] commandParameters)
at NCSUtilities.DataAccess.ExecuteDataset(String connectionString,
CommandType commandType, String commandText, SqlParameter[] commandParameters)

Any ideas on how I could identify the cause or how I could resolve this
would be greatly appreciated.

Thanks,
Keith F
 
A

Angel Saenz-Badillos[MS]

You should ask in an asp.net newsgroup for better information, take a look
at this link for part of what I am talking about:
http://asp.net/faq/AspNetAndIIS6.aspx
Under "Configuring worker process memory limits" and "Configuring worker
recycling" you can see some of the options that force process recycling.

As far as the ado.net part, it would help if you tried to take asp.net out
of the equation and tried your code on a winform, maybe you could find out
exactly how long it is taking (or if it is working at all)

Hope this helps,
--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging about ADO.NET: http://weblogs.asp.net/angelsb/




Keith F. said:
Angel,
Thanks for your response.
I tried bumping up the script timeout setting in IIS for this site to 180
seconds but it doesn't seem to have resolved the issue. Could you tell me if
there is a difference between setting the script timeout property in IIS
through the IIS managment console and the httpRuntime Attribute
"executionTimeout" in the machine.cofig file?

I'm also trying to figure out if this is being caused by the database server
or the web server.
Could you elaborate more on your last statement: "there are also other
forced thread aborts linked to resource utilization etc." ? And possibly what
to look for?

Thanks, Keith


Angel Saenz-Badillos said:
Keith,
I would expect a timeout error too, in fact I would trust the exception and
look for a reason why the thread abort could be happening. If you are using
asp.net there is a default (and settable) timeout of three minutes, there
are also other forced thread aborts linked to resource utilization etc.

--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging about ADO.NET: http://weblogs.asp.net/angelsb/




Keith F. said:
Hi,
I have a web app that is intermittently throwing "Thread was being aborted."
errors in my data access component. This seems to occur when the app
is
under
a heavier than normal load.
I would have thought if the DB call was timing out I would get a timeout
error.
This is a sample of the exception details I'm getting:

System.Threading.ThreadAbortException: Thread was being aborted.
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(Comman
dBehavior 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)
at NCSUtilities.DataAccess.ExecuteDataset(SqlConnection connection,
CommandType commandType, String commandText, SqlParameter[] commandParameters)
at NCSUtilities.DataAccess.ExecuteDataset(String connectionString,
CommandType commandType, String commandText, SqlParameter[] commandParameters)

Any ideas on how I could identify the cause or how I could resolve this
would be greatly appreciated.

Thanks,
Keith F
 
G

Guest

ThreadAbortException happens when the thread serving the request doesn't
finish for a long time. The ASP.NET hosting process aborts this thread after
certain time.
You can adjust the that time with:

<system.web>
<httpRuntime executionTimeout="600" />
</system.web>

By default the executionTimeout="90" seconds.
 

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

Top