Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Find App Pool Recycles in Event Log

Tags:

iis

iis-7.5

I have configured an app pool in IIS 7.5 to recycle when the memory usage goes above a certain level. I have also configured it to log this information.

Where in the event log should I look for this?

I have tried filtering based on the source being all the IIS items, e.g. 'IIS-W3SVC-WP', 'IIS-IISManager', and all the rest, but nothing.

I can see that it is adding in the items from the 'IIS-Configuration' log too which I enabled. But still nothing.

like image 481
peter Avatar asked Apr 02 '12 22:04

peter


People also ask

Where are IIS application pool logs?

IIS log files are stored by default in the %SystemDrive%\inetpub\logs\LogFiles folder of your IIS server.

What is recycle in application pool?

What is application pool recycling in IIS? Recycling means that the worker process that handles requests for that application pool is terminated and a new one is started. This is generally done to avoid unstable states that can lead to application crashes, hangs, or memory leaks.


2 Answers

It seemed quite hard to find this information, but eventually, I came across this question
You have to look at the 'System' event log, and filter by the WAS source.
Here is more info about the WAS (Windows Process Activation Service)

like image 65
peter Avatar answered Sep 29 '22 16:09

peter


As it seems impossible to filter the XPath message data (it isn't in the XML to filter), you can also use powershell to search:

Get-WinEvent -LogName System | Where-Object {$_.Message -like "*recycle*"} 

From this, I can see that the event Id for recycling seems to be 5074, so you can filter on this as well. I hope this helps someone as this information seemed to take a lot longer than expected to work out.

This along with @BlackHawkDesign comment should help you find what you need.

I had the same issue. Maybe interesting to mention is that you have to configure in which cases the app pool recycle event is logged. By default it's in a couple of cases, not all of them. You can do that in IIS > app pools > select the app pool > advanced settings > expand generate recycle event log entry – BlackHawkDesign Jan 14 '15 at 10:00

like image 23
Mr Shoubs Avatar answered Sep 29 '22 16:09

Mr Shoubs