Compartilhar via


Enable Worker Process Pinging for an Application Pool (IIS 7)

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

You can monitor and improve application pool health by having the Windows Process Activation Service (WAS) ping an application pool's worker process at set intervals.

Note

Worker process pinging differs from Internet Control Message Protocol (ICMP) pinging. Instead, it uses an internal communication channel between the WAS and the worker process.

A lack of response from the worker process might mean that the worker process does not have a thread to respond to the ping request, or that it is hanging for some other reason. Based on the results of the ping request, WAS can flag a worker process as unhealthy and shut it down.

By default, worker process pinging is enabled. You may have to adjust the ping interval and the ping response time to gain access to timely information about application pool health without triggering false unhealthy conditions, for example, instability caused by an application.

Important

Some ISAPI extensions, such as ASP and ASP.NET, are built to programmatically signal the WAS service when they need to be recycled because of various conditions, such as deadlocks. You should also consider the effect of recycling on the other applications located in the same worker process with the ISAPI extension.

Prerequisites

For information about the levels at which you can perform this procedure, and the modules, handlers, and permissions that are required to perform this procedure, see Application Pools Feature Requirements (IIS 7).

Exceptions to Feature Requirements

  • None

To enable worker process pinging for an application pool

You can perform this procedure by using the user interface (UI), by running Appcmd.exe commands in a command-line window, by editing configuration files directly, or by writing WMI scripts.

User Interface

To use the UI

  1. Open IIS Manager. For information about opening IIS Manager, see Open IIS Manager (IIS 7).

  2. On the Connections pane, expand the server node and click Application Pools.

  3. On the Application Pools page, select the application pool for which you want to enable worker process pinging and then click Advanced Settings in the Actions pane.

  4. For the Pinging Enabled property, select True to enable pinging or False to disable pinging, and then click OK.

Command Line

To enable or disable worker process pinging for an application pool, use the following syntax:

**appcmd set apppool /apppool.name:**string /processModel.pingingEnabled:true|false

The variable string is the name of the application pool that you want to configure. For example, to enable worker process pinging for an application pool named Marketing, type the following at the command prompt, and then press ENTER:

appcmd set apppool /apppoolname:Marketing /processModel.pingingEnabled:true

By default, worker processes receive pings every thirty seconds, and must respond to a ping within ninety seconds. If you want to change the time between pings, you can configure the /processModel.pingInterval attribute, and to change the time in which an application pool must respond to a ping, you can configure the /processModel.pingResponseTime attribute. To configure the ping interval and ping response time, use the following syntax:

**appcmd set apppool /apppool.name:**string **/processModel.pingInterval:**timeSpan **/processModel.pingResponseTime:**timeSpan

The variable string is the name of the application pool that you want to configure. The variable timeSpan is in the format d.hh:mm:ss, where d is the optional number of days, and hh:mm:ss is the number of hours, minutes, and seconds between health monitoring pings (in the /processModel.pingInterval attribute), and by which the worker process must respond (in the /processModel.pingResponseTime attribute). For example, to configure the ping interval for forty-five seconds and the ping response time for two minutes for an application pool named Marketing, type the following at the command prompt, and then press ENTER:

appcmd set apppool /apppool.name:Marketing /processModel.pingInterval:0.00:00:45 /processModel.pingResponseTime:0.00:02:00

For more information about Appcmd.exe, see Appcmd.exe (IIS 7).

Configuration

The procedure in this topic affects the following configuration elements:

pingingEnabled attribute of the <processModel> element under <add> under <applicationPools>

For more information about IIS 7 configuration, see IIS 7.0: IIS Settings Schema on MSDN.

WMI

Use the following WMI classes, methods, or properties to perform this procedure:

  • ApplicationPool.ProcessModel.PingingEnabled property

For more information about WMI and IIS, see Windows Management Instrumentation (WMI) in IIS 7. For more information about the classes, methods, or properties associated with this procedure, see the IIS WMI Provider Reference on the MSDN site.

See Also

Concepts

Managing Application Pools in IIS 7