I would like IIS to log application pool recycle events.  I followed this article

restarted IIS and even rebooted the machine then recycled the app pool that I want to log events on, but the recycle events aren't being written to the system log or any other log that I can see.  Anyone have any ideas what I might be doing wrong?



The reason you are not seeing recycle events written to the event log is because no worker processes actually recycled when you demand-recycled the application pool. In other words, the IIS Manager UI always gives you the option to trigger "Recycle" of the application pool, but if no worker processes are currently running and servicing the application pool, no worker processes actually recycle and hence no event log gets written.

For efficiency and reliability reasons, IIS6 demand-starts worker processes for application pools. What this means is that you can define 100 applications, each with its own application pool, but until a request is made to that application, no worker process (and hence no system resources) are consumed. Default configuration also has "idle timeout" where the worker process terminates itself and release system resources when it has not handled any requests for the specified amount of time. Both demand-start and idle-timeout allow IIS6 to naturally optimize system resources towards active applications.

What this means is that when you restarted IIS or rebooted the system, no one has made any requests to your server to demand-start any worker processes... so none are running and you obviously cannot demand recycle non-existent worker processes...

Thus, to see your configuration work, simply first make a request to a URL serviced by the application pool you plan to recycle, and then do the demand-recycle of the application pool in the IIS Manager UI. You should now see an event log entry in the System event log.

And, this feature works dynamically as soon as you set the metabase property - no IIS restart or server reboot required.