473,503 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Intermittent ThreadAbortException while processing posted XML

Every day a large chunk of XML is posted up to my app via http. The app
interprets this XML and writes results to a SQLServer. Occasionally a
ThreadAbortException is thrown during this process. Despite being
caught, this exception propagates all the way up the call stack. I know
this is by design and that I can use Thread.ResetAbort to stop this
exception from bubbling up the stack.

But I want to know why the exception is thrown in the first place.

My app is not multithreaded, and I never call Thread.Abort directly.
Maybe something I am doing causes it to be called but I don't know
what that could be.

I know that Response.Redirect and Response.End throw a
ThreadAbortException, but I do not use either of those. Instead I use
HttpContext.Current.ApplicationInstance.CompleteRe quest() which I
presume also throws a ThreadAbortException. But since this is only
called when the job is complete, I do not see how this could be a
problem.

At this point I am guessing that a setting in my machine.config or
web.config is telling IIS to kill my process from some reason. I have
set machine.config's httpRuntime attributes executionTimeout and
maxRequestLength to 2 hours (way longer than the job takes) and 1gig
(way bigger than the posted xml) respectively.

Any ideas how to figure out why I am getting this ThreadAbortException?

Nov 19 '05 #1
4 1718
most likely the xml post to your site is failing, causing a IIS connection
close/timeout/error, causing the iis to asp.net pipe to be closed, causing
a asp.net thread abort. you should expect this behavior, as the internet is
not reliable.

-- bruce (sqlwork.com)

<sp*****@gmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
| Every day a large chunk of XML is posted up to my app via http. The app
| interprets this XML and writes results to a SQLServer. Occasionally a
| ThreadAbortException is thrown during this process. Despite being
| caught, this exception propagates all the way up the call stack. I know
| this is by design and that I can use Thread.ResetAbort to stop this
| exception from bubbling up the stack.
|
| But I want to know why the exception is thrown in the first place.
|
| My app is not multithreaded, and I never call Thread.Abort directly.
| Maybe something I am doing causes it to be called but I don't know
| what that could be.
|
| I know that Response.Redirect and Response.End throw a
| ThreadAbortException, but I do not use either of those. Instead I use
| HttpContext.Current.ApplicationInstance.CompleteRe quest() which I
| presume also throws a ThreadAbortException. But since this is only
| called when the job is complete, I do not see how this could be a
| problem.
|
| At this point I am guessing that a setting in my machine.config or
| web.config is telling IIS to kill my process from some reason. I have
| set machine.config's httpRuntime attributes executionTimeout and
| maxRequestLength to 2 hours (way longer than the job takes) and 1gig
| (way bigger than the posted xml) respectively.
|
| Any ideas how to figure out why I am getting this ThreadAbortException?
|
Nov 19 '05 #2
Bruce,

Thanks for taking the time to respond.

When this error occurs, the complete XML post has been validated and
logged to the file system -- so I am sure that the document made it
into MyApp. The http post is happening on a local network - not going
through the internet. I have confirmed that PostingApp has a huge http
timeout and that it can keep open http pipes for much longer than I
need. I have an old VB6 version of MyApp that can handle posts of this
size from the same PostingApp with no problems. Because of this am
assuming the issue is with MyApp.

Another bit of information I missed in the first post: The requests
that have died with this exception do not take longer to run and do not
contain larger post data than some other successful requests. They are
significantly bigger and slower than the average post but are not the
biggest or slowest.

Nov 19 '05 #3
Bruce,

Thanks for taking the time to respond.

When this error occurs, the complete XML post has been validated and
logged to the file system -- so I am sure that the document made it
into MyApp. The http post is happening on a local network - not going
through the internet. I have confirmed that PostingApp has a huge http
timeout and that it can keep open http pipes for much longer than I
need. I have an old VB6 version of MyApp that can handle posts of this
size from the same PostingApp with no problems. Because of this am
assuming the issue is with MyApp.

Another bit of information I missed in the first post: The requests
that have died with this exception do not take longer to run and do not
contain larger post data than some other successful requests. They are
significantly bigger and slower than the average post but are not the
biggest or slowest.

Nov 19 '05 #4
Bruce,

Thanks for taking the time to respond.

When this error occurs, the complete XML post has been validated and
logged to the file system -- so I am sure that the document made it
into MyApp. The http post is happening on a local network - not going
through the internet. I have confirmed that PostingApp has a huge http
timeout and that it can keep open http pipes for much longer than I
need. I have an old VB6 version of MyApp that can handle posts of this
size from the same PostingApp with no problems. Because of this am
assuming the issue is with MyApp.

Another bit of information I missed in the first post: The requests
that have died with this exception do not take longer to run and do not
contain larger post data than some other successful requests. They are
significantly bigger and slower than the average post but are not the
biggest or slowest.

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
5261
by: Dan | last post by:
We have a fairly large set of ASP.NET applications running on Windows 2003 SP1 server. The entire suite of software was originally written in ASP and ran on a Win 2k server. For about the last...
0
1353
by: Al | last post by:
I've got an intermittent bug with Postbacks and ASP.NET, maybe someone has seen before: In a nutshell, on two servers the form postbacks are fine, and all the DropDownLists, TextBoxes, and else...
6
2124
by: David Waz... | last post by:
Moved an app from W/2000 Asp V1.0 to W/2003, VS/2003, ASPV 1.1 Page runs a long job, uploading 2 large fixed length files (300,000 rows) into SQL database. A process is run against the data,...
3
1888
by: Steve - DND | last post by:
I just implemented a page that performs a Response.Redirect(url, true). As such, I wrapped it in a try catch, and explicitly caught a ThreadAbortException. However, the thread abort exception was...
2
2282
by: Liverpool fan | last post by:
I have a VB .NET windows application that is throwing an intermittent 'out of memory' error. Here is the call stack. Out of memory. at System.Drawing.Graphics.FromHdcInternal(IntPtr hdc) at...
0
1074
by: bobgateaux | last post by:
I have an APS.Net web service which calls another ASP.NET web service on another (local) machine. Every now any again I get the ThreadAbortException "Thread was being aborted" reported on the...
0
1377
by: andy6 via DotNetMonster.com | last post by:
When I run a specific report I intermittently, on different laptops, desktops, etc, get this error: An error has occurred during report processing. Exception of type 'System.OutOfMemoryException'...
3
3316
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
Hi, I am running a web service which sometimes throws exceptions. I have a lot of error trapping within the web service, but I have missed the current problem. I am working on the current issue,...
2
9521
by: Zeba | last post by:
Hi ! I am using a httphandler to perform some url rewriting in my application. My web.config contains the following entry to direct all urls containing /App/*.ashx to my class AppHandler.cs in...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7011
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5596
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.