How To: Configure Scheduled Recycles of Application Pools and Logging

Follow
    Applies to:
  • SecureAuth Identity Platform
Deployment model:
  • Cloud
  • Hybrid
  • On Premises
  • Version Affected: All

     

    Overview

    This article explains how to work with Application Pool recycling in Internet Information Services (IIS): scheduling recycles for a specific, quiet time instead of the IIS default, and enabling recycle logging so recycle events can be found afterward.

    • Use Method 1 to control when an Application Pool recycles, so it does not happen during busy periods.
    • Use Method 2 to find out when and why an Application Pool recycled.

    In this article

     

    Method 1: Schedule Recycles for a Quiet Time

    By default, IIS recycles an Application Pool every 29 hours (1,740 minutes). This can cause a recycle to happen during a busy period, which can look like a performance issue or an outage to anyone interacting with the site at that moment. It is recommended to schedule the recycle for a specific, quiet time instead.

    1. Open IIS Manager.
    2. Navigate to Application Pools.
    3. Click the .NET v4.5 Application Pool and select Advanced Settings.
    4. Scroll down to Specific Times and click the ellipsis (...) to edit it, as shown below.

    Advanced Settings dialog with the Specific Times recycle setting highlighted.

    1. Click Add and set the time to a quiet period — for example, 1:30 AM — as shown below.

    Specific Times dialog with a recycle time of 1:30 AM added.

    1. Click OK to close the TimeSpan window.
    2. Click OK to close the Advanced Settings window.

     

    Method 2: Enable and View Recycle Logging

    By default, not all Application Pool recycles are logged by IIS. IIS allows log entries to be created at a granular level for recycle events, based on what triggered the recycle.

    1. Open IIS Manager on the Identity Platform (IdP) appliance and expand server name, then Application Pools.
    2. Right-click the Application Pool you want to log recycle events for — usually the pool named .NET v4.5, unless additional custom pools are in use — then click Advanced Settings, as shown below.

    Application Pool right-click menu with Advanced Settings highlighted.

    1. Expand Generate Recycle Event Log Entry, then set the desired child nodes to True, as shown below, and click OK.

    Advanced Settings dialog with the Generate Recycle Event Log Entry section expanded, showing child nodes set to True.

    1. To view Application Pool recycle events, open Event Viewer and click the standard System event log.
    2. To view only Application Pool recycle events, add a filter to include only an event source of WAS, as shown below.

    Event Viewer filter dialog with the event source set to WAS.

    1. You should now see all the recycle events, as shown below.

    Event Viewer showing a filtered list of Application Pool recycle events with a WAS event source.

     

    Special Considerations

    Application Pool recycles only trigger a log entry if there are IIS Worker processes actually running for the given Application Pool at the time. If there are no worker processes running — for example, due to inactivity — the Application Pool recycle has nothing to do, so it does not log anything either.




    SecureAuth Knowledge Base Articles provide information based on specific use cases and may not apply to all appliances or configurations. Be advised that these instructions could cause harm to the environment if not followed correctly or if they do not apply to the current use case.

    Customers are responsible for their own due diligence prior to utilizing this information and agree that SecureAuth is not liable for any issues caused by misconfiguration directly or indirectly related to SecureAuth products.

    0 out of 0 found this helpful

    Comments

    0 comments

    Please sign in to leave a comment.