Logging Worker Process Recycling Events in IIS 6.0 (IIS 6.0)
By default, IIS does not log worker process recycling events. You can, however, enable logging of the worker process recycling events that you specify. Unlike other IIS activity, which is logged in a location and file that you specify, worker process recycling events are written to the system event log.
Logging worker process recycling events can help you with troubleshooting IIS. For example, when troubleshooting an ISAPI extension that implements the new server support function REPORT_UNHEALTHY, you can specify that IIS logs an event for each instance that the ISAPI reports itself unhealthy.
The following table describes the worker process recycling events for which you can enable logging. To enable logging for an event, set the corresponding metabase property to true.
Logs event on time-based recycles.
Logs event on number of request-based recycles.
Logs event on schedule-based recycless.
Logs event on memory-based recycle.
Logs event when worker processes request recycles because an ISAPI reported unhealthy.
Logs event when an administrator requests a recycle of all processes in the application pool.
Logs an event if an application pool is recycled because one of the application pool properties that requires a recycle to take effect has changed.
Logs an event if an application pool is recycled based on private memory.
You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /User:MyComputer\Administrator cmd to open a command window with administrator rights and then type cscript.exeScriptName (include the script's full path and any parameters).
To enable logging of worker process recycling
From the Start menu, click Run.
In the Open box, type cmd, and then click OK.
At the command prompt, type the following and then press ENTER: cd %systemroot%\inetpub\adminscripts
At the command prompt, type the following and then press ENTER: csript adsutil.vbs set w3svc/AppPools/AppPoolName/EventName true
Replace AppPoolName with the name of the application pool and EventName with the name of the event for which you want to enable logging. For example, the following command enables logging of memory-based recycling events for the default AppPool: csript adsutil.vbs set w3svc/AppPools/DefaultAppPool /AppPoolRecyleMemory true
To disable logging of worker process recycling events, end the command-line with false.
The following table shows an example system event log entry along with the event ID for each type of recycling event.
A worker process with process ID IDNumber serving application pool AppPoolName has requested a recycle because the worker process reached its allowable processing limit.
A worker process with process ID IDNumber serving application pool AppPoolName has requested a recycle because it reached its request limit.
A worker process with process ID IDNumber serving application pool AppPoolName has requested a recycle because it reached its scheduled recycle time.
A worker process with process ID IDNumber serving application pool AppPoolName has requested a recycle because it reached its virtual memory limit.
A worker process with process ID IDNumber serving application pool AppPoolName has requested a recycle because an ISAPI it loaded reported unhealthy and requested a recycle.
An administrator has requested a recycle of all worker processes in application pool AppPoolName.
The worker processes serving application pool AppPoolName are being recycled due to one or more configuration changes in the application pool properties which necessitate a restart of the processes.
A worker process with process ID IDNumber serving application pool AppPoolName has requested a recycle because it reached its private bytes memory limit.
For information about setting the LogEventOnRecycle metabase property, see LogEventOnRecycle Metabase Property.
For information about viewing the system event log, see "Event Viewer" in Help and Support Center for Windows Server 2003.