Export (0) Print
Expand All

Configure Logging of Events when an Application Pool Recycles because of Configured Recycling Events (IIS 7)

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

You can configure IIS to log an event when one or more of the following configured events cause an application pool to recycle:

  • Scheduled Time: You configure an application pool to recycle at a certain time of day.

  • Regular time intervals: You configure an application pool to recycle after a specified time.

  • Number of Requests: You configure an application pool to recycle after reaching a certain number of requests.

  • Virtual Memory Usage: You configure an application pool to recycle after you use a specified amount of virtual memory.

  • Memory Usage: You configure an application pool to recycle after you use a specified amount of memory.

You can then view the log to determine when or how frequently an application pool recycles because of configured events. This can help you troubleshoot problems on the server, such as applications that have memory leaks or applications that fail after reaching a certain number of requests.

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

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.

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

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

  3. On the Application Pools page, select an application pool, and then click Recycling in the Edit Application Pool area in the Tasks pane.

  4. On the first page of the Edit Application Pool Recycling Settings wizard, click Next.

  5. To log configured recycling events, in the Configurable recycling events area, select one or more of the following check boxes:

    • Regular time intervals

    • Virtual memory usage

    • Number of requests

    • Scheduled time(s)

    • Private memory usage

      noteNote
      Only recycling options that you enable on the previous page are enabled on the logging page.

  6. Click Finish.

To configure IIS to log an event when an application pool recycles because of a non-configured event, use the following syntax:

appcmd set config /section:applicationPools /[name=' string '].recycling.logEventOnRecycle: PrivateMemory|Memory|Schedule|Requests|Time

The variable string is the name of the application pool that you want to configure. For example, to configure IIS to log an event when an application pool named Marketing recycles because reaches a specified number of requests, type the following command at the command prompt, and then press ENTER:

appcmd set config /section:applicationPools /[name=' Marketing '].recycling.logEventOnRecycle:Requests

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

The procedure in this topic affects the following configuration elements:

logEventOnRecycle attribute of the <recycling> element

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

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

  • ApplicationPool.Recycling.LogEventOnRecycle 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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft