Showing posts with label component. Show all posts
Showing posts with label component. Show all posts

Tuesday, March 13, 2012

Thread timeouts

Hi,
I have web based email management system where a user can login, create an
email and then send it to multiple recipients.
The email component I use generates all of the physical .eml files when they
click send. When a user is sending to 120, 000 recipients at once the page
times out.
I was thinking of using a separate worker thread for creating the email
messages (I dont have to worry about sending because the files get put into
a pickup directory that gets read by an SMTP component). My main concern
is - would the thread timeout at all, when trying to generate so many files?
Thanks in advance
GrahamHi Graham:
Threads do not time out, so I wouldn't have this concern.
Applications can timeout, however. I can configure an application pool in
Win2003 to shut down an app after x minutes of inactivity. A background thre
ad
isn't considered activity though - only incoming requests are. Something
to look for in your config.
Scott
http://www.OdeToCode.com/blogs/scott/

> Hi,
> I have web based email management system where a user can login,
> create an
> email and then send it to multiple recipients.
> The email component I use generates all of the physical .eml files
> when they
> click send. When a user is sending to 120, 000 recipients at once the
> page
> times out.
> I was thinking of using a separate worker thread for creating the
> email
> messages (I dont have to worry about sending because the files get put
> into
> a pickup directory that gets read by an SMTP component). My main
> concern
> is - would the thread timeout at all, when trying to generate so many
> files?
> Thanks in advance
> Graham

Thread timeouts

Hi,
I have web based email management system where a user can login, create an
email and then send it to multiple recipients.
The email component I use generates all of the physical .eml files when they
click send. When a user is sending to 120, 000 recipients at once the page
times out.
I was thinking of using a separate worker thread for creating the email
messages (I dont have to worry about sending because the files get put into
a pickup directory that gets read by an SMTP component). My main concern
is - would the thread timeout at all, when trying to generate so many files?

Thanks in advance
GrahamHi Graham:

Threads do not time out, so I wouldn't have this concern.

Applications can timeout, however. I can configure an application pool in
Win2003 to shut down an app after x minutes of inactivity. A background thread
isn't considered activity though - only incoming requests are. Something
to look for in your config.

--
Scott
http://www.OdeToCode.com/blogs/scott/

> Hi,
> I have web based email management system where a user can login,
> create an
> email and then send it to multiple recipients.
> The email component I use generates all of the physical .eml files
> when they
> click send. When a user is sending to 120, 000 recipients at once the
> page
> times out.
> I was thinking of using a separate worker thread for creating the
> email
> messages (I dont have to worry about sending because the files get put
> into
> a pickup directory that gets read by an SMTP component). My main
> concern
> is - would the thread timeout at all, when trying to generate so many
> files?
> Thanks in advance
> Graham

Thread was being aborted errors

Hi,
I have an asp.net 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 don't get any of these errors for
days, then I get a bunch all at once.
I would have thought if the database call was timing out I would get a
timeout
error.
The server is Win 2003 (under VMware), and hosts multiple asp and asp.net
web applications.

This is a sample of the exception details I'm getting:

System.Threading.ThreadAbortException: Thread was being aborted.
at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCo mmand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(O bject 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(SqlConnecti on connection,
CommandType commandType, String commandText, SqlParameter[] commandParameters)
at NCSUtilities.DataAccess.ExecuteDataset(String connectionString,
CommandType commandType, String commandText, SqlParameter[] commandParameters)

I got a suggestion to look at the "DefaultAppPool" properties on the web
server, but I'm not sure what settings to modify.

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

Thanks,
Keith FIn most circumstances that I have seen, this issue occurs when the
application pool is being reset. One easy way to isolate the problem is to
match the times of the thread error with the application pool reset log in
the windows event viewer. The fix is to increase the recycle parameters on
the applicaiton pool in question.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Keith F." <KeithF@.discussions.microsoft.com> wrote in message
news:D42B570D-11E4-485A-8CA9-B55D3D31A389@.microsoft.com...
> Hi,
> I have an asp.net 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 don't get any of these errors
> for
> days, then I get a bunch all at once.
> I would have thought if the database call was timing out I would get a
> timeout
> error.
> The server is Win 2003 (under VMware), and hosts multiple asp and asp.net
> web applications.
> This is a sample of the exception details I'm getting:
> System.Threading.ThreadAbortException: Thread was being aborted.
> at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
> cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
> at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
> behavior)
> at
> System.Data.SqlClient.SqlCommand.System.Data.IDbCo mmand.ExecuteReader(CommandBehavior
> behavior)
> at System.Data.Common.DbDataAdapter.FillFromCommand(O bject 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(SqlConnecti on connection,
> CommandType commandType, String commandText, SqlParameter[]
> commandParameters)
> at NCSUtilities.DataAccess.ExecuteDataset(String connectionString,
> CommandType commandType, String commandText, SqlParameter[]
> commandParameters)
> I got a suggestion to look at the "DefaultAppPool" properties on the web
> server, but I'm not sure what settings to modify.
> Any ideas on how I could identify the cause or how I could resolve this
> would be greatly appreciated.
> Thanks,
> Keith F

Thread was being aborted errors

Hi,
I have an asp.net 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 don't get any of these errors for
days, then I get a bunch all at once.
I would have thought if the database call was timing out I would get a
timeout
error.
The server is Win 2003 (under VMware), and hosts multiple asp and asp.net
web applications.
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[] commandParameter
s)
at NCSUtilities.DataAccess.ExecuteDataset(String connectionString,
CommandType commandType, String commandText, SqlParameter[] commandParameter
s)
I got a suggestion to look at the "DefaultAppPool" properties on the web
server, but I'm not sure what settings to modify.
Any ideas on how I could identify the cause or how I could resolve this
would be greatly appreciated.
Thanks,
Keith FIn most circumstances that I have seen, this issue occurs when the
application pool is being reset. One easy way to isolate the problem is to
match the times of the thread error with the application pool reset log in
the windows event viewer. The fix is to increase the recycle parameters on
the applicaiton pool in question.
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Keith F." <KeithF@.discussions.microsoft.com> wrote in message
news:D42B570D-11E4-485A-8CA9-B55D3D31A389@.microsoft.com...
> Hi,
> I have an asp.net 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 don't get any of these errors
> for
> days, then I get a bunch all at once.
> I would have thought if the database call was timing out I would get a
> timeout
> error.
> The server is Win 2003 (under VMware), and hosts multiple asp and asp.net
> web applications.
> 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(Comm
andBehavior
> 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)
> I got a suggestion to look at the "DefaultAppPool" properties on the web
> server, but I'm not sure what settings to modify.
> Any ideas on how I could identify the cause or how I could resolve this
> would be greatly appreciated.
> Thanks,
> Keith F
>