ASP.Net timeouts

M

Mark

Hi...

We've got a page that's throwing HttpException "Request timed out" error
messages and for the life of us we can't figure out why. One of the problems
is that there is no stack trace with that exception so it's harder to figure
out what it's doing when the clock runs out. Attaching a debugger obviously
changes things.

I've found a number of posts online where people say there are 2 event log
messages for both the HttpException and the underlying ThreadAbortException.
In the screen caps I've found the event log message for the
ThreadAbortException includes the stack trace of the thread getting whacked.

But on our systems, I only see one event log message for the HttpException.
By default our application does have an error handler. I've tried changing
it to do a Server.ClearError() and not, still no ThreadAbortException trace.

I deleted the web config to get the handler out of the way; this changed the
text of the HttpException message in the event log but still no
ThreadAbortException and no trace.

How does one get a stack trace of where the page was at the time of timeout?

We're still using 2.0.50727.3082
 
A

Allen Chen [MSFT]

Hi,
We've got a page that's throwing HttpException "Request timed out" error
messages and for the life of us we can't figure out why. One of the problems
is that there is no stack trace with that exception so it's harder to figure
out what it's doing when the clock runs out. Attaching a debugger obviously
changes things.
I've found a number of posts online where people say there are 2 event log
messages for both the HttpException and the underlying ThreadAbortException.
In the screen caps I've found the event log message for the
ThreadAbortException includes the stack trace of the thread getting
whacked.

From your description, the innerexception of this HttpException is null.
There's no managed call stack on the thread that throws this exception.

This behavior, based on my experience, is typically caused by
executionTimeout is smaller than the real execution time. You can not get
any managed call stack of the thread that throws this excetpion because
there's no one. And it even doesn't make sense to get it because the tasks
that potentially cause this issue are run by other threads.

You can reproduce it if you set the executionTimeout to a small value and
do a lot of time consuming taks in the processing request phase:
<system.web>
<httpRuntime executionTimeout="3" .../>
...
</system.web>

Please check out the following documentation for more details about this
element:
http://msdn.microsoft.com/en-us/library/e1f13641.aspx

So, first, please let me know the approximate process time of the web
request that causes this exception. You can do unit test to get the time.
If it's longer than two minutes, most likely this is the culprit, if you're
using the default setting of httpRuntime element.

You can also add some trace at the begining/end of any time conusuming
tasks. This will give you a clear picture of which task is done before this
exception.

If you use WinDbg to debug, please use the following command to list all
call stack of managed threads:
~* e!clrstack
In this way you can know what all managed threads are doing at that moment.

Download Debugging Tools for Windows:
http://www.microsoft.com/whdc/devtools/debugging/default.mspx

Please keep me updated if you find anything. If you have further questions
please feel free to ask. I'll do my best to follow up.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Allen Chen [MSFT]

Hi,
We've got a page that's throwing HttpException "Request timed out" error
messages and for the life of us we can't figure out why. One of the problems
is that there is no stack trace with that exception so it's harder to figure
out what it's doing when the clock runs out. Attaching a debugger obviously
changes things.
I've found a number of posts online where people say there are 2 event log
messages for both the HttpException and the underlying ThreadAbortException.
In the screen caps I've found the event log message for the
ThreadAbortException includes the stack trace of the thread getting
whacked.

Do you have any progresss on this issue?

Regards,
Allen Chen
Microsoft Online Support
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top