Generate a dump file when ASP. NET is locked in iis6.0

Source: Internet
Author: User

Editor's note:
IIS 6.0 has a new feature called "isolated working processes. This feature allows you to check the process to be recycled before it is terminated. Isolated working processes can be used to attach a debugProgramGenerate a dump file for investigation.

Author: Microsoft msdn

Summary

When you are locked in Internet Information Service (IIS) 6.0, an error message similar to the following will appear in the Application Event Log:

Event Type: Warning

Event Source: W3SVC-WP

Event category: None

Event ID: 2262

Date: 7/29/2003

Time: 12:08:58

User: N/

COMPUTER: computername

Description: ISAPI 'C: \ winnt \ Microsoft. NET \ framework \ v1.1.4322 \ aspnet_isapi.dll 'reported itself as unhealthy for the following reason: 'destlock detected '.

The following error message is displayed in the System Event Log:

Event Type: Warning

Event Source: w3svc

Event category: None

Event ID: 1013

Date: 7/29/2003

Time: 12:09:34

User: N/

COMPUTER: computername

Description: A process serving application pool 'defaultapppool 'exceeded time limits during shut down. The process ID was '2016 '.

Generate a dump file for the diagnosis program

IIS 6.0 has a new feature called "isolated working processes. This feature allows you to check the process to be recycled before it is terminated. Isolated working processes can be used to attach a debugging program to the process and generate a dump file for investigation.

Note: This function is unavailable when the process is running in IIS 5.0 compatibility mode.

Create a batch file and execute it when a worker process is isolated

1. Start notepad.

2. Set the followingCodePaste it to notepad:


             
              
@ If "% _ echo %" = "" Echo offsetlocal set timestamp = % Date :~ -9% _ % time % set timestamp = % timestamp:/= _ % set timestamp = % timestamp :. = _ % set timestamp = % timestamp: = _ % set filename = c: \ crash _ % timestamp %. dmpset log = c: \ log.txt set command = c: \ debuggers \ cdb.exe-c ". dump/O/mhf % filename %; q "-P % 1 echo % command %> % log % command % endlocal

             

3. Save the file as the file name. cmd. In this example, we name the file action. cmd. You can also give the file another name at will.

Note: You may have to modify the debugging program location and the location where you want to generate the dump file.

Configure isolated working process settings

1. type the following command at the command prompt and press Enter:

CD \ Inetpub \ adminscripts

2. To make the function of an isolated working process available, enter the following command at the command prompt: adsutil. vbs set w3svc/apppools/defaultapppool/orphanworkerprocess true

3. At the command prompt, set the executable files to run when the process is scheduled to recycle. For example, in this case, use the batch file created in the "Create a batch file and execute it when a worker process is isolated" 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 created in "Create a batch file and execute it when a worker process is isolated. Make sure that the w3wp.exe process has read and execute permissions on the file.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.