How to Find App Pool Recycles in Event Log

前端 未结 4 1607
渐次进展
渐次进展 2021-01-30 16:05

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 eve

相关标签:
4条回答
  • 2021-01-30 16:07

    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)

    0 讨论(0)
  • 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

    0 讨论(0)
  • 2021-01-30 16:28

    As link-only answers are not preferred, I will just copy and paste the content of the link of the accepted answer


    It is definitely System Log.

    Which Log file? Well -- you can check the physical path by right-clicking on the System Log (e.g. Server Manager | Diagnostics | Event Viewer | Windows Logs). The default physical path is %SystemRoot%\System32\Winevt\Logs\System.evtx.

    You can create a Custom Filter and filter by "Source: WAS" to quickly see only entries generated by IIS.

    You may need first to enable logging of such even for a specific App Pool -- by default App Pool has only 3 recycle events out of 8 enabled. To change it using GUI: II S Manager | Application Pools | Select App Pool -> Advanced Settings | Generate Recycle Event Log Entry.

    0 讨论(0)
  • 2021-01-30 16:30

    IIS version 8.5 +

    To enable Event Tracing for Windows for your website/application

    1. Go to Logging and ensure either ETW event only or Both log file and ETW event ...is selected.

    1. Enable the desired Recycle logs in the Advanced Settings for the Application Pool:

    1. Go to the default Custom View: WebServer filters IIS logs:

    Custom Views > ServerRoles > Web Server

    1. ... or System logs:

    Windows Logs > System

    0 讨论(0)
提交回复
热议问题