Process Recycling events can be configured at various levels of the IIS metabase using either the User Interface (UI) or by directly editing the metabase. All properties configured for Process Recycling are inherited by the lower levels of the IIS metabase, except where a lower level has been specifically configured.
- Pooled applications are configured at the W3SVC level along with all other pooled out-of-process applications.
- Isolated applications are configured at the AppRoot level of their associated Web site.
Metabase Keys
There are four metabase keys unique to Process Recycling. The first three keys listed below can be configured from the UI. The fourth key, ShutdownTimeLimit, can only be configured by editing the metabase directly.
- PeriodicRestartRequests
This property indicates the number of requests the application should process. After which the application(s) gets recycled. For more information, see PeriodicRestartRequests.
- PeriodicRestartTime
This property indicates the period in minutes that an application services requests. After which IIS recycles an isolated application. For more information, see PeriodicRestartTime.
- PeriodicRestartSchedule
This property specifies the time of day, in 24 hour format. When this time of day is reached the application is recycled. For more information, see PeriodicRestartSchedule.
- ShutdownTimeLimit
This property specifies the amount of time, in seconds, after a recycle threshold has been reached that IIS will wait for all old application requests to finish running in the old DLLHost.exe process. When the ShutdownTimeLimit is reached, IIS will terminate the old DLLHost. For more information, see ShutdownTimeLimit.
Application Security
You should understand the AppIsolated metabase key when configuring Process Recycling without the UI, because the parameter value of the AppIsolated key tells you the security level of the application. You then use this information to determine where to make your Process Recycling settings. An application, along with it's security level, can be configured at various levels of the metabase. The security level determines where the application gets it's Process Recycling settings.
| Application Protection |
Metabase setting |
| Low (IIS) |
AppIsolated = 0 |
| Medium (Pooled) |
AppIsolated = 2 |
| High (Isolated) |
AppIsolated = 1 |
The following metabase configuration example shows the metabase keys in bold that are used to configure Process Recycling at various levels of the metabase.
Metabase Configuration Example
/W3SVC
AppIsolated = (INTEGER) 0
PeriodicRestartTime = (INTEGER) 60
PeriodicRestartRequests = (INTEGER) 10000
PeriodicRestartSchedule = (STRING) “03:30” “21:30”
ShutdownTimeLimit = (INTEGER) 6000
…other default site/app settings…
/W3SVC/1
ShutdownTimeLimit = (INTEGER) 700
/W3SVC/1/root
AppIsolated = (INTEGER) 2
PeriodicRestartTime = (INTEGER) 0
…other app settings…
/W3SVC/1/root/isolatedApp
AppIsolated = (INTEGER) 1
PeriodicRestartTime = (INTEGER) 600
PeriodicRestartRequests = (INTEGER) 0
ShutdownTimeLimit = (INTEGER) 900
…other app settings…
/W3SVC/1/root/PooledApp
AppIsolated = (INTEGER) 2
…other app settings…
/W3SVC/1/root/PooledApp/WebDir
/W3SVC/1/root/inprocApp
AppIsolated = (INTEGER) 0
…other app settings…
- The W3SVC level, also known as the IISWebService level, is the highest level in the metabase where Process Recycling can be configured. Configurations set at this level are inherited by lower levels that do not have specific configuration settings. Recycling events for all pooled applications are configured at this level.
- The W3SVC/n level, also known as the IISWebServer level, is a specific Web site, where "n" is the number of the site. Sites are numbered starting at 1. Process Recycling settings cannot be configured at this level using the UI. In the example above, at the /W3SVC/1/root level, the PeriodicRestartTime event has been disabled by setting the zero parameter. Lower levels that do not specifically have the PeriodicRestartTime key set will inherit the setting from this level.
- The W3SVC/n/Root level, known as the IISWebVirtualDir level, is the starting point for a Web Site, where "n" is the number of the site. Process Recycling events for isolated applications can be configured, or disabled for a particular Web site at this level.
- The W3SVC/n/ROOT/WebVirtualDir level, known as the IISWebVirtualDir level, is a virtual directory within a Web Site, where "n" is the number of the site. In the example above, the /W3SVC/1/root/IsolatedApp level (where IsolatedApp is the name of the virtual directory) shows the PeriodicRestartRequests setting with a zero parameter. The zero parameter disables the PeriodicRestartRequests event at this level. Otherwise the /W3SVC/1/root/IsolatedApp level would inherit a setting of 10000 from the /W3SVC level.
- The W3SVC/n/Root/WebVirtualDir/WebDir level, also known as the IISWebDirectory level, is a physical directory within a virtual directory within a Web Site, where "n" is the number of the site. In the example above /W3SVC/1/root/PooledApp/WebDir shows a directory called WebDir within the PooledApp virtual directory within Web site 1. Because WebDir inherits the AppIsolated = 2 (Pooled) setting from the /W3SVC/1/root/PooledApp level, the WebDir level inherits the process recycling configuration settings from the W3SVC level.
- In the example above, the /W3SVC/2/root/isolatedApp has Process Recycling settings configured for each recycling event except PeriodicRestartSchedule. Since the next higher level that has PeriodicRestartSchedule configured is the W3SVC level, then PeriodicRestartSchedule will be inherited from the W3SVC level and recycling will occur at 03:30 AM and 9:30 PM each day.
See About Applications for more information about creating an application and setting a security level. See Defining Application Boundaries for information about setting an application's starting point and boundary.
© 1997-2001 Microsoft Corporation. All rights reserved.