Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What causes an application pool in IIS to recycle?

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.

like image 822
Slavo Avatar asked Nov 19 '08 14:11

Slavo


People also ask

What triggers app pool recycle?

Application pool(s) recycle. The worker process hosting your applications can recycle due to a configuration change, time limit, idle timeout, excessive memory usage, and many other reasons.

Why does IIS recycle?

Worker process isolation mode offers process recycling, in which IIS automatically refreshes Web applications by restarting their worker processes. Process recycling keeps problematic applications running smoothly, and is an especially effective solution in cases where it is not possible to modify the application code.

How often does application Pool recycle?

You can specify that IIS recycle an application pool at set intervals (such as every 180 minutes), at a specific time each day, or after the application pool receives a certain number of requests.

Why is the IIS default app pool recycle set to 1740 minutes?

The 1740 story Wade suggested 29 hours for the simple reason that it's the smallest prime number over 24. He wanted a staggered and non-repeating pattern that doesn't occur more frequently than once per day.


1 Answers

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).

like image 139
Mitchel Sellers Avatar answered Oct 12 '22 18:10

Mitchel Sellers