Set SharePoint Application Pool Recycle Time

By design application pools in IIS are restarted once per every 29 hours to provide best performance and stability. The very first user access SharePoint after app pool recycle will experience considerable delay, as .net assemblies needs to be recompiled to the memory. So, we use Warm-up scripts for SharePoint 2013 to mitigate this issue.

Configure Application Pool Recycle time Settings
Lets customize SharePoint 2010/SharePoint 2013 application pool recycling settings, So that our Warmup script run just after the specific time.

  • Go to IIS Manager >> Application Pools >> Pick your App Pool 
  • Right Click and choose "Recycling..." .
Set SharePoint Application Pool Recycle Time

You'll find the recycling conditions. time attribute under "Recycling " group. You can adjust this setting to incorporate with your Warm-up script schedule. Just make your warmup script to run after the App Pool recycle time. Enter the specific time, Click Next and then Finish.

You can also set the recycle time in Application pool's advanced settings
sharepoint application pool recycle time
Don't disable Application Pool recycling by removing the Time Span values, You'll run in to memory leaks which could lead to web server out of memory issues!

Configure Application Pool Recycling time with PowerShell:
Import-Module WebAdministration

$AppPoolName = "SP13_Intranet_AppPool"

Set-ItemProperty -Path "IIS:\AppPools\$AppPoolName" -Name Recycling.periodicRestart.schedule -Value @{value="03:00"}
Consider Recycling application pools at different times in different Web servers to provide maximum availability!

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.