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.
- Open IIS Manager.
- Navigate to Application Pools.
- Click the .NET v4.5 Application Pool and select Advanced Settings.
- Scroll down to Specific Times and click the ellipsis (...) to edit it, as shown below.
- Click Add and set the time to a quiet period — for example, 1:30 AM — as shown below.
- Click OK to close the TimeSpan window.
- 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.
- Open IIS Manager on the Identity Platform (IdP) appliance and expand server name, then Application Pools.
- 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.
- Expand Generate Recycle Event Log Entry, then set the desired child nodes to True, as shown below, and click OK.
- To view Application Pool recycle events, open Event Viewer and click the standard System event log.
- To view only Application Pool recycle events, add a filter to include only an event source of WAS, as shown below.
- You should now see all the recycle events, as shown below.
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.
Comments
Please sign in to leave a comment.