DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 828222 - Last Review: December 3, 2007 - Revision: 8.6

On This Page

SUMMARY

When you experience a deadlock in Microsoft Internet Information Services (IIS) 6.0, a message that resembles the following will appear in the Application log:

Event Type: Warning
Event Source: W3SVC-WP
Event Category: None
Event ID: 2262
Date: 7/29/2003
Time: 12:08:58 PM
User: N/A
Computer: ComputerName
Description: ISAPI 'C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll' reported itself as unhealthy for the following reason: 'Deadlock detected'.

Additionally, a message that resembles the following will appear in the System log:

Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 1013
Date: 7/29/2003
Time: 12:09:34 PM
User: N/A
Computer: ComputerName
Description: A process serving application pool 'DefaultAppPool' exceeded time limits during shut down. The process id was '2756'.For more information, see Help and Support Center at http://support.microsoft.com (http://support.microsoft.com/) .

Generate dump files for diagnosis

IIS 6.0 has a new feature that is named Orphan Worker Process. This feature lets you inspect a process that is scheduled to be recycled before the process is terminated. The Orphan Worker Process can be used to attach a debugger to the process and to generate a dump file for investigation.

Note This feature is not enabled when processes run in IIS 5.0 compatibility mode.

Download Debugging Tools for Windows

To download Debugging Tools for Windows, visit one of the following Microsoft Web sites, as appropriate for your situation:

Windows 32-bit version:
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx (http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx)
Windows 64-bit version:
http://www.microsoft.com/whdc/devtools/debugging/install64bit.mspx (http://www.microsoft.com/whdc/devtools/debugging/install64bit.mspx)
Note When you install Debugging Tools for Windows, make sure that you save the files to the following directory:
C:\Debuggers

Create a batch file to execute when a worker process is orphaned

  1. Start Notepad
  2. Paste the following code into Notepad.
    @if "%_echo%"=="" echo off
    setlocal
        set TIMESTAMP=%DATE:~-9%_%TIME%
    set TIMESTAMP=%TIMESTAMP:/=_%
    set TIMESTAMP=%TIMESTAMP::=_%
    set TIMESTAMP=%TIMESTAMP:.=_%
    set TIMESTAMP=%TIMESTAMP: =_%
    set FILENAME=c:\crash_PID_%1_%TIMESTAMP%.dmp
    set LOG=c:\log.txt
    set COMMAND=c:\debuggers\cdb.exe -c ".dump /o /ma %FILENAME%;q" -p %1
    
    echo %COMMAND% > %LOG%
    %COMMAND%
    
    endlocal
  3. Save the file as FileName.cmd. For this example, we will name the file Action.cmd. However, you may name the file as you want.
Note You may have to modify the location of the debuggers and the location where you want the resulting dump file to be generated.

Configure the Orphan Worker Process settings

  1. At the command prompt, type the following command, and then press ENTER:
    cd \Inetpub\adminscripts
  2. To enable the Orphan Worker Process feature, type the following command at the command prompt:
    adsutil.vbs SET W3SVC/AppPools/DefaultAppPool/OrphanWorkerProcess TRUE
    
  3. At the command prompt, set the executable to run when a process is scheduled to be recycled. For example, in this case use the batch file that was created in the "Create a Batch File to Execute When a Worker Process Is Orphaned" section:
    adsutil.vbs SET W3SVC/AppPools/DefaultAppPool/OrphanActionExe "c:\action.cmd"
    adsutil.vbs SET W3SVC/AppPools/DefaultAppPool/OrphanActionParams "%1%" 
    
Note Make sure that the OrphanActionExe option points to the location of the batch file that was created in the "Create a Batch File to Execute When a Worker Process Is Orphaned" section. Also make sure that the identity of the W3wp.exe process has Read and Execute permissions to this file.

Note If you enable IIS to debug worker processes that are reported as unhealthy, make sure that you monitor these released worker processes. IIS does not automatically remove these worker processes from memory. If you do not correctly handle these worker processes, many failed worker processes may be running on your computer. These worker processes can tie up resources that are needed by other processes. You must end these worker processes quickly to free those resources. In some conditions, these worker processes may block metabase access. This causes problems with other worker processes or with the World Wide Web service itself.

REFERENCES

For more information, visit the following Microsoft Developer Network (MSDN) Web sites:
http://msdn2.microsoft.com/en-us/library/ms525365.aspx (http://msdn2.microsoft.com/en-us/library/ms525365.aspx)

http://msdn2.microsoft.com/en-us/library/ms524472.aspx (http://msdn2.microsoft.com/en-us/library/ms524472.aspx)

http://msdn2.microsoft.com/en-us/library/ms525700.aspx (http://msdn2.microsoft.com/en-us/library/ms525700.aspx)
For more information about how to debug a worker process that is reported as unhealthy, visit the following Microsoft Web site:
http://technet2.microsoft.com/WindowsServer/en/library/37f477fc-c683-438b-ac11-17ad554fd59a1033.mspx?mfr=true (http://technet2.microsoft.com/WindowsServer/en/library/37f477fc-c683-438b-ac11-17ad554fd59a1033.mspx?mfr=true)

APPLIES TO
  • Microsoft ASP.NET 1.1
  • Microsoft Internet Information Services 6.0
Keywords: 
kbdebug kbhowtomaster KB828222
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support