This tip pertains to all versions of SharePoint and no versions of SharePoint. It is really more of an IIS troubleshooting tip.
When strange things happen to IIS application pools I am reminded of the old public service announcement, “Do you know where your children are?” Well, do you know what your application pools are doing? When was the last time one restarted? What is the history of restarts? If you cannot answer these questions read ahead.
To find out when an application pool has started or how long it has been running use Process Explorer to view the time the application pool process started.
Now that you can find out the current start times of application pools how do you get a history of when application pools have been restarted.
Enable logging of application pool restarts to the Event Log; http://support.microsoft.com/kb/332088. To make a long KB simple; use the following command to enable the logging of all types of restarts for an application pool:
cscript adsutil.vbs Set "w3svc/AppPools/<App Pool Name>/LogEventOnRecycle" 255
To disable logging of recycle events for an application pool use the following:
cscript adsutil.vbs Set "w3svc/AppPools/<App Pool Name>/LogEventOnRecycle" 0
After the logging is set there is no need to IISRESET or reboot, the change is instant.
To view the recycle events open Event Viewer on the machine and look in the System Event Log for the following event ids: 1074, 1075, 1076, 1077, 1078, 1079, 1080 and 1177.
Now you can keep track of those application pools.