What causes an application pool in IIS to recycle

application-poolasp.netiis

I have been searching for info on this to no avail. The context of why i need this is another question I asked here. More specifically, does creating/updating/deleting files in App_Data cause a pool recycle?

If someone could provide a detailed list of what causes a recycle, that would be great.

UPDATE: As two users already noticed I would also be happy to an answer specifying reasons for recycling the AppDomain only and not the whole pool.

Best Answer

The article you liked in the other post actually did a really good job of this.

Immediate Recycle

  • Web.config changes
  • Machine.config changes
  • Global.asax changes
  • Bin directory changes
  • App_Code changes

Delayed Recycle

Can occur with multiple changes in other locations, typically, I've only noticed this with changes to .aspx or .cs/.vb files though. Adding temporary text, csv or other files has not resulted in issues for me.

NOTE: These are all app-domain recycles, and not actual recycles of the pool. Typically the application POOL will only recycle based on settings in IIS (Number of requests, memory limit, idle time, or scheduled restart).