How to check app pool last recycled
You could easily find the latest recycle time by using this powershell snippet:
(Get-Process -Id <ProcessId>).StartTime
Therefore find the process id of your web application in task manager.
First add the following columns via Tools > Select columns... : select PID and Command Line.
Look for any w3wp.exe process and find your application by examining the command-line (application pool name is part of it) and note down its PID.
Then run the powershell script to find the latest recycle time:
Hope this helps
If logging on recycles is turned on you can see this in the Event Viewer (System Log).
If it's not you can use PerfMon counters to see Process-Elapsed Time on the W3WP.exe representing your application pool (which will be the number of seconds since the last recycle)
To get all the information with one command use the Get-WmiObject instead of get-process.
Get-WmiObject Win32_Process -Filter "name = 'w3wp.exe'" | Select-Object Name, @{"name"="ApplicationPool";expression={(($_).CommandLine).split('"')[1] }},@{"name"="Starttime";expression={$_.ConvertToDateTime($_.CreationDate)}}
In Powershell:
(ps -id (Get-IISAppPool -Name <name>).WorkerProcesses.ProcessId).StartTime
If the pool has been recycled, then for some reason you may need to re-import the module to get the new processId:
$pool = Get-IISAppPool -Name <name>
$pool.recycle()
Import-Module -Force IISAdministration
(ps -id (Get-IISAppPool -Name <name>).WorkerProcesses.ProcessId).StartTime