RE: how analyze malfunctioning asp.net application?



Hi

Thanks for your reply, as far as we have been able to tell so far the CPU
utilisation is not particularly high at the time the page becomes
unresponsive. This would seem to imply some blocking or locking although the
worker process does not seem to recycle itself automatically.

We have looked at the page logic and can't determine anything particularly
unusual so far, would you recommend looking at running debugging tools on the
server?

Also is there any tool that you know about that could examine the logic of
the page in a development environment to identify which functions are taking
up the most resources or could be causing a potential lock?

Scott
--
Scott


"Steven Cheng[MSFT]" wrote:

Hello Scott,

From your description, I understand one page in one of your ASP.NET web
application is suffering no-responding issue periodically after deployed to
a product server, correct?

Based on my experience, such non-responding behaves as: client connecting
to the websites and the server page will report that the request take a
long time to execute/process. Have you checked the CPU usage on the server
machine when the problem occurs?

If the task manager shows 100%(or near 100%) CPU for w3wp.exe
process(ASP.NET worker process on win2ke server /IIS6), this is called a
"busy hang". Such busy hang is usually caused by one or a few threads in a
tight loop.

If the CPU is close to 100% but not pegged at 100%, the process may just be
under to heavy load and multiple threads together account for the high CPU.


Else if the CPU is 0% or very low usage, it is indicating there is some
blocking or locking(deadlock) in the application process.

Is your problem page's non-responding behavior matches any of the above
symtoms?

By default, when ASP.NET detects a deadlock, it will report itself
unhealthy and teh worker process will be recycled. You can have a look in
the application eventlog on the deployment server to see whether there is
any event entry associated with your ASP.NET application.

For general troubleshooting, you can analyze the code logic in your home
page (suffering the issue) to see whether there're any particular code that
is likely the potential cause. If convenient, you can provide some further
info about it.

I'm not sure whether it is possible to run some debugger tools on your
deployment server or is it possible and convenient that you perform
production debugging in your environment. For such problems, if the
condition is critical, we would suggest contact CSS for production
debugging. However, there are also some reference introducing production
debugging in MSDN, if you have interests, you can have a look and perform
some production debugging on the deployment server against your ASP.NET
application.

The basic steps are:

1. Identify your ASP.NET application's worker process, on Windows 2003
server/IIS6, the worker process is w3wp.exe and you need to identify the
exact one that host the problem application.

2. Use task manager to check whether the worker process suffers high CPU
when the problem occurs.

3. Use the system performance counters(use perfmon) to identify some other
process/thread specific statistic to(such as thread id, memory usage....).
The following performance counters are helpful against which you can
capture some performance logs:

**Process
**Processor
**Thread
**ASP.NET
**ASP.NET Applications

for configure performance counter logs, you can refer to the following
article:

http://support.microsoft.com/kb/300504/en-us


After you identify the thread or more detailed problem behavior, we need to
use some debugging tools to attach to the worker process (or capture some
static dump files of the worker process) and analyize it in debugger.

Here are some msdn reference about performing production debugging through
Debugging tools for windows against ASP.NET application:


#Production Debugging for .NET Framework Applications
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/
DBGch01.asp

#Debugging Contention Problems
http://msdn.microsoft.com/library/en-us/dnbda/html/DBGch03.asp?frame=true


Hope this helps. Please feel free to let me know if there is any specfic
info you're wondering.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 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 or complex
project analysis and dump analysis issues. 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/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.






.



Relevant Pages


Loading