HTTP requests often go into Isapi filters, and either never come back out, or become extremely slow or unresponsive. Using the underlying Enterprise Tracing for Windows (ETW), the Trace Diagnostics utility simplifies HTTP request-tracing. It includes several components, including IISREQMON, IISTRACE for the command-line and IIS Request Viewer (User Interface). The toolset will only install on Service Pack 1 or higher versions of Wi...
When an Internet Information Services (IIS) worker process has become unresponsive or slow, Trace Diagnostics is used to understand what requests are executing in that worker process. When an HTTP request is picked up by IIS, it may be handled by multiple components before a response is generated back to the client computer. If a request fails or becomes unresponsive as it makes its way through these components, error-reporting channels like the Windows Event Log and the HTTP Error Log might not provide enough detail to help you locate the source of the problem. That's when tracing comes in handy.
- Request Monitor is a command-line helper tool for working with currently executing requests in IIS 6.0 running on Microsoft Windows Server 2003 SP1 or later. It will help you determine what requests are executing in a worker process when it has become slow or unresponsive. When enabled, Request Monitor prompts worker processes to report statistics and details about every request in each worker process.
- IISTrace is a command-line helper tool for requesting tracing in IIS 6.0 running on Microsoft Windows Server 2003 SP1 or later. IIStrace goes beyond iisreqmon. It allows you to view requests in an apppool and trace the events that occur in order to process those requests. This means you can identify flaws in customer code and provide them with guidance on making corrections.
- IIS Request Viewer is a GUI that displays all currently running application pools, threads and currently executing requests per application pool. It uses the underlying tracing commands to create, start, refresh and stop traces. It will display the Request ID, Client IP, State of the request and Time that the request has been taking.
These components of the Trace Diagnostics utility can help you determine root causes of HTTP request issues, specify which providers report events to ETW during a specific trace session, customize how much trace data providers report to ETW, determine which URLs to trace, thereby focusing your troubleshooting efforts on a specific application.
From a high level, request-based tracing works like this:
- The administrator enables a tracing session on the IIS server from a command prompt.
- Enterprise Ttracing for Windows (ETW) notifies IIS providers to begin reporting trace events.
- A request enters the IIS worker process.
- The administrator stops the trace session and reviews the trace log to locate the source of the problem.
- Problems are typically identified by error events or a START event that does not contain a corresponding END event.
Since there are multiple tools within the Trace Diagnostics utility, each with their own specific attributes, I will only focus on using the GUI tool, IIS Request Viewer. To trace requests in using the IIS Trace tool:
- Go to Start-> Programs -> IIS Diagnostics (32bit) -> Trace Diagnostics -> IIS Request Viewer -> reqviewer.exe.
- Click File -> Retrieve Requests.
- Expand the left-hand navigation tree to view the different application pools running on your system.
- View the requests in the right-hand window.
If you get the common error below, set your TEMP system variable to something shorter, like C:Temp.
ERROR: Open TraceLogFile() failed (Win32 error -largeinteger - The path specified is invalid)
For more information, read Trace Diagnostics Known Bugs and How to Fix 'Em.
Inside the IIS Diagnostics Toolkit
How to install the Microsoft IIS Diagnostics Toolkit
How to use SSL Diagnostics 1.0
How to use Authentication and Access Control Diagnostics (AuthDiag) 1.0
How to use Exchange Server SMTP Diagnostics 1.0
How to use Log Parser 2.2
How to use WFetch 1.4
How to use Trace Diagnostics
How to use Debug Diagnostics 1.0
About the author: Tim Fenner (MCSE, MCSA: Messaging, Network+ and A+) is a senior systems administrator who oversees a Microsoft Windows, Exchange and Office environment. He is also an independent consultant who specializes in the design, implementation and management of Windows networks.