SUMMARY
This step-by-step article describes how to set the flags
that control the
LogEventOnRecycle property in the Internet Information Services (IIS) 6.0 metabase.
The
LogEventOnRecycle metabase property is a DWORD
that has various bit flags for what type of recycling will generate an entry in
the system event log. When you troubleshoot an ISAPI extension that implements
the new server support function
REPORT_UNHEALTHY, you may find it helpful to log an event for each instance that
the ISAPI reports itself unhealthy.
Important This is a feature of application pools, and therefore applies
only to worker process isolation mode.
back to the topEnumerating the flags
Important This article contains information about editing the metabase.
Before you edit the metabase, verify that you have a backup copy that you can
restore if a problem occurs. For information about how to do this, see the
"Configuration Backup/Restore" Help topic in Microsoft Management Console
(MMC).
You can enumerate
Application Pools Recycling event flag settings by means of a script, such as the Adsutil.vbs
utility.
To enumerate the properties and flags that are listed in the
IIS metabase for Application Pools, and to view their current value, follow
these steps:
- Open a command prompt: click Start, click
Run, and then type
cmd. - Change to the directory where the Adsutil utility is
located. The following is the default directory location:
%SYSTEMROOT%\Inetpub\AdminScripts
- Type the following command:
cscript
adsutil.vbs enum w3svc/AppPools
back to the top Explanation of flags
Metabase property | Description |
AppPoolRecycleTime | Log event on Time-based recycles
if set to true. |
AppPoolRecycleRequests | Log event on number of
Requests-based recycles if set to true. |
AppPoolRecycleSchedule | Log event on Schedule-based
recycles if set to true. |
AppPoolRecycleMemory | Log event on Memory-based
recycle if set to true. |
AppPoolRecycleIsapiUnhealthy | Log event when worker
processes request recycles because an ISAPI reported unhealthy if set to
true. |
AppPoolRecycleOnDemand | Log event when an
administrator requests a recycle of all processes in the application pool when
set to true. |
AppPoolRecycleConfigChange | Log an event if an
Application Pool is recycled because one of the application pool properties
that require a recycle to take effect has changed if set to true. |
AppPoolRecyclePrivateMemory | Log an event if an
Application Pool is recycled based on private memory when set to true . |
back to the topSetting the flags
You can set the flags by using Adsutil.vbs. To set the
AppPoolRecyleMemory flag to
false for the default Application Pool, follow these steps:
- Click Start, click Run,
and then type cmd at the command prompt.
- Change to the directory where Adsutil is located. The
following is the default directory location:
%SYSTEMROOT%\Inetpub\AdminScripts
- Type the following command:
cscript
adsutil.vbs Set w3svc/AppPools/DefaultAppPool /AppPoolRecyleMemory
false.
Note This command assumes that the
LogEventOnRecycle property is enabled. If this command fails with the ErrNumber:
-2147463164 (0x80005004), you must first enable the
LogEventOnRecycle property. To enable the
LogEventOnRecycle property, run one of the following commands:
- To set all the values to FALSE, run the following command:
cscript adsutil.vbs Set w3svc/AppPools/DefaultAppPool/LogEventOnRecycle 0
- To set all the values to TRUE, run the following command:
cscript adsutil.vbs Set w3svc/AppPools/DefaultAppPool/LogEventOnRecycle 255
Note Information about the metabase locations where you can configure
the flags is in the documentation that is included with the product. For the
same information online, visit the following TechNet Web site:
back to the topEvent log entries
The following events appear in the Event log.
Flag set to True | Event generated | Event ID |
AppPoolRecycleTime | A worker process with process id
"XXXX" serving application pool " AppPoolName" has requested a recycle because
the worker process reached its allowable processing limit. | 1074 |
AppPoolRecycleRequests | A worker process with process
id "XXXX" serving application pool " AppPoolName" has requested a recycle
because it reached its request limit. | 1075 |
AppPoolRecycleSchedule | A worker process with process
id "XXXX" serving application pool " AppPoolName" has requested a recycle
because it reached its scheduled recycle time. | 1076 |
AppPoolRecycleMemory | A worker process with process id
"XXXX" serving application pool " AppPoolName" has requested a recycle because
it reached its virtual memory limit. | 1077 |
AppPoolRecycleIsapiUnhealthy | A worker process with
process id "XXXX" serving application pool " AppPoolName" has requested a
recycle because an ISAPI it loaded reported unhealthy and requested a
recycle. | 1078 |
AppPoolRecycleOnDemand | An administrator has requested
a recycle of all worker processes in application pool "
AppPoolName". | 1079 |
AppPoolRecycleConfigChange | The worker processes
serving application pool " AppPoolName" are being recycled due to 1 or more
configuration changes in the application pool properties which necessitate a
restart of the processes. | 1080 |
AppPoolRecyclePrivateMemory | A worker process with
process id "XXXX" serving application pool " AppPoolName" has requested a
recycle because it reached its private bytes memory limit. | 1177 |
back to the topTroubleshooting
Information about the errors you may experience when setting
these flags is in the documentation that is included with the product. For the
same information online, see the following TechNet Web site:
back to the
top