i just read a blog in msdn that .Net 4.5.1 introduces the new app pool setting App Suspend. In what circumstance you want to set your app pool to "Suspend" rather than "Terminate" or vice versa? if the "Suspend" idle mode is the much better setting than Terminate, then why not defaulting to Suspend and get rid of the "Terminate" idle mode.
How to Stop Application Pools Using the IIS Manager. On the Connections pane, expand the server node and click Application Pools to display all Application Pools. On the Application Pools page, select the application pool for the published application that is running. Click Stop to stop the application pool.
This issue occurs when the IIS application pool Identity Parameter is not set to NetworkService. To resolve this issue, change the Identity parameter to NetworkService in the IIS Manager for Windows Server: Select the Advanced Settings for the DefaultAppPool.
Go to Websites & Domains > Dedicated IIS Application Pool for Website. Select the “Enable 32-bit applications” checkbox and then click OK.
Configuring Auto-Start with IIS Manager In the Connections pane, select the Application Pools node, revealing the Application Pools pane in the main view. Select the application pool for which you wish to enable Auto-Start. Locate the Start Mode option under the General group and set it to AlwaysRunning. Click OK.
IIS version 6 and above uses Application Pools to serve websites. Each App Pool is basically a separate worker process that will respond to requests for whatever websites you have in that App Pool. It helps to isolate different websites from each other (resource usage, errors, security breaches, etc).
Part of the way Application Pools are structured, they are by default "recycled" or restarted every so often to avoid application crashes or reset memory leaks.
There are three main ways that cause an App Pool to recycle:
Recycling isn't a big deal because IIS will create a new process and transfer requests before terminating the old process so there's no gap in serving requests. However, there is a setting for the App Pools that will terminate the process completely if there are no requests for a certain amount of time (default of 20 mins).
When the app pool shuts down and a new request comes in, then there's a noticeable lag of several seconds for the worker process to start, load the .NET frameworks, compile any pages in your app and finally serve the request. This is referred to as a "cold start" and can create a bad experience for your users.
You can disable both the recycle settings and the timeout-based terminate options if you want (and I do for several big applications) but if you are running lots of sites on a single server that don't get a lot of continuous traffic, you can conserve resources by using the new "Suspend" option.
Instead of completely terminating the process, IIS instead moves it to a very low-memory state. This way if a new request does come in, your app starts up instantly. There's no lag. But when there's no traffic, it uses just a tiny fraction of memory and no CPU so there's no overhead on your server.
It's really meant for shared environments with servers running lots of sites. If you have constant traffic you won't notice a difference since the App Pools never stop anyway but if you're sticking to the default settings then I highly recommend setting the App Pools to Suspend mode. Note that this requires both Windows Server 2012 R2 and .NET 4.5.1 to work.
Here's a Youtube video explaining it further from the Visual Studio team: https://www.youtube.com/watch?v=hXw5gyqTxoo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With