Debugging Windows DNAbased ECommerce Applications Aaron Barth Technical Lead Solution Integration En - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Debugging Windows DNAbased ECommerce Applications Aaron Barth Technical Lead Solution Integration En

Description:

ASP hang. All ASP/COM threads are busy. No more threads can be created. ASP request queue is full ... Hang. Isolate problem. Run 'emcmd /p' ... – PowerPoint PPT presentation

Number of Views:67
Avg rating:3.0/5.0
Slides: 33
Provided by: supportM
Category:

less

Transcript and Presenter's Notes

Title: Debugging Windows DNAbased ECommerce Applications Aaron Barth Technical Lead Solution Integration En


1
Debugging Windows DNA-based E-Commerce
Applications Aaron BarthTechnical
LeadSolution Integration EngineeringMicrosoft
Corporation
2
Objectives
  • Help troubleshoot problems with Microsoft
    Windows Distributed interNet Applications (DNA)
    e-commerce applications by
  • Understanding Web application architecture
  • Identifying common support problems
  • Mapping tools and techniques to solve common
    problems

3
Web Application Architecture
  • Types of Web requests
  • HTM or image (static content)
  • Served from disk
  • ISAPI (dynamic content)
  • Filters (DLL)
  • Extensions (DLL)
  • ASP (dynamic content)
  • Interpreted script
  • COM applications
  • Compiled code (DLL or EXE)

4
Windows DNA 2000 Web Architecture
IIS Pool Threads
ASPProcessorThreadMax (25 x CPUs)
SMTP
FTPSVC
W3SVC
Web Application Manager
Inetinfo.exe
Port 80
5
Web Application Architecture
  • Thread pools
  • IIS pool threads
  • Configured in registry
  • PoolThreadLimit
  • MaxPoolThreads
  • ASP/COM worker threads
  • Configured in the metabase
  • ASPProcessorThreadMax
  • COM worker threads
  • Not configurable

6
Isolation Levels
  • IIS process
  • Low isolation
  • Default in IIS 4.0
  • Pooled
  • Medium isolation
  • New defaultin IIS 5.0
  • Isolated
  • High isolation
  • Existed in IIS 4.0

7
IIS Process (Low)
IIS Pool Threads
ISAPI
Web Application Manager
SMTP
FTPSVC
W3SVC
Inetinfo.exe
8
Pooled (Medium)
Dllhost.exe
Web Application Manager
Inetinfo.exe
9
Isolated (High)
Dllhost.exe
Web Application Manager
Inetinfo.exe
10
Advantages and Disadvantages
11
Common Support Problems
  • Crash
  • Access violation
  • Other exceptions
  • Stop responding (hang)
  • IIS hang
  • ASP hang or ASP queuing
  • Resource-related failures
  • High CPU utilization
  • Memory leak

12
Application Crashes (Dev)
  • Developer view
  • Access violations
  • Compiled code reads from or writes to memory that
    it does not have access to
  • Other exceptions
  • Divide by zero
  • RPC server unavailable

13
Application Crashes (Ops)
  • Operational view
  • IIS process
  • Process dies or becomes unstable
  • Services may restart
  • Event is logged in the event log
  • Dr. Watson dialog box
  • Isolated/pooled/COM application
  • Application is terminated and restarted on next
    request (JIT Activation)
  • Event is logged in the event log
  • All state (session/application/component) is lost

14
Crashes IIS Process
IIS Pool Threads
X
ISAPI
Web Application Manager
SMTP
FTPSVC
W3SVC
Inetinfo.exe
15
Crashes Pooled And Isolated
Dllhost.exe (1)
X
ISAPI
Web Application Manager
Inetinfo.exe
16
DEMO Crash
17
Application Hangs (Dev)
  • Developer view
  • IIS hang
  • Thread blocking
  • Existing threads performing long running
    operations
  • No more threads available
  • ASP hang
  • All ASP/COM threads are busy
  • No more threads can be created
  • ASP request queue is full

18
Application Hangs (Ops)
  • Operational view
  • IIS hang
  • HTM or static file requests hang
  • Cannot connect to Web server
  • ASP hang
  • ASP?Requests executing counter is close to or
    equal to ASProcesssorThreadMax x number of CPUs
  • ASP?Requests queued is gt0 for an extended period
    of time
  • ASP pages do not return data, but static content
    can be served

19
DEMO Hang
Dual processor computer ASProcessorThreadMax
25 25 x 2 50 requests executing
20
Resource Related Failures (Dev)
  • Developer view
  • High CPU utilization
  • Code running a thread or threads runs into a
    tight loop and does not yield CPU time
  • Low memory conditions
  • Processes or DLLs allocate memory that is not
    freed
  • Processes or DLLs starve the operating system of
    resources by using all available memory
  • Processes or DLLs use handles without closing
    them (leak)

21
Resource Related Failures (Ops)
  • Operational view
  • High CPU utilization
  • Processor?ProcessorTime is close to 100
  • Process? ProcessorTime ? inetinfo.exe or
    dllhost.exe is close to 100
  • All server operations seem sluggish
  • Low memory conditions
  • Events logged to the event log
  • Memory? Available bytes decreases
  • Process? Private bytes ? inetinfo.exe or dllhost
    increases
  • All server operations seem sluggish

22
DEMO CPU Utilization
23
Diagnostic/Debugging Tools
  • Exception monitor
  • User mode process dump
  • Service
  • Manual dump
  • Windows Debugger (WinDBG)

24
DEMO Exception Monitor
25
Exception Monitor
  • Advantages
  • Lightweight, quick and easy to use
  • Great for isolating down to the DLL that is
    causing the problem
  • Disadvantages
  • Sometimes not enough information
  • If symbols are wrong can be misleading
  • Where to get it?
  • http//msdn.microsoft.com/workshop/server/iis/ixc
    ptmon.asp
  • (Note that the URL should be entered as one
    line it is wrapped here for readability.)

26
DEMO User Mode Process Dump
27
User Mode Process Dump
  • Advantages
  • Provides a process snapshot at the time the dump
    is created
  • All information about a crash is in the dump file
    (parameters, modules, threads)
  • Disadvantages
  • Dump file can be large if process has a large
    memory footprint
  • Need symbols to be correct when reading the dump
    file
  • Dump snapshot does not show history (before crash
    etc.)
  • Where do I get it?
  • http//www.microsoft.com/downloads/release.asp?Re
    leaseID17805
  • (Note that the URL should be entered as one
    line it is wrapped here for readability.)

28
DEMO Windows Debugger
29
Windows Debugger (WinDBG)
  • Advantages
  • Powerful lightweight debugger
  • Can perform source level debugging
  • Can read dump files (.dmp)
  • Excellent symbol support
  • Disadvantages
  • Not well known
  • GUI application that can be slower than
    command-line debuggers
  • Windows 2000 Customer Diagnostics and Support
    Tools CD

30
Mapping The Tools To The Problems
  • Isolate problem
  • Run Exception Monitor
  • View .dbl file with Log File Analyzer
  • Run UserDump as a service
  • Analyze .dmp file with Windows Debugger

Crash
31
Mapping The Tools To The Problems
  • Isolate problem
  • Run emcmd /p
  • Run Userdump.exe against each process ID from
    step 2 Inetinfo.exe
  • Analyze .dmp files with Windows Debugger

Hang
32
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com