Enable and monitor ASP.NET App Suspend on Windows Server 2012 R2
This post describes how to enable and monitor ASP.NET App Suspend on Windows Server 2012 R2. It was written by Rich Lander, a Program Manager on the .NET team.
ASP.NET App Suspend is a big new feature in the .NET Framework 4.5.1. You can read an overview of ASP.NET App Suspend (including a demonstration video) over on the .NET blog. ASP.NET App Suspend is a great feature for shared hosters and Enterprise IT. It enables apps to startup much faster and for each server to host many more apps. In our performance lab, we saw startup time drop by 90% and were able to pack 7 times more sites onto the same machine, when App Suspend was enabled. That’s a unique and welcome combination.
App Suspend is a new hosting configuration in Internet Information Services (IIS) in Windows Server 2012 R2. The only requirement is that your app is running on the .NET Framework 4.5.1, which comes with Windows Server 2012 R2. No code changes are required. It’s literally as simple as the flip of a switch. Let’s take a look at that switch.
How to enable ASP.NET App Suspend
Enabling ASP.NET App suspend is pretty easy, in Internet Information Services Manager. As I wrote earlier, this setting is set on an app pool basis. Here’s what you need to do.
- Open the IIS Manager
- Right-click on an app pool – you’ll see the context menu
- Select “Advanced Settings …”
You will see the Advanced Settings dialog. The “Idle Time-out” settings are the important ones to look at for this scenario, particularly the “Idle Time-out Action”. The default for that setting is terminate.
Change the “Idle Time-out Action” to Suspend, as you see below. Your app pool is now configured for ASP.NET App Suspend.
You will probably want to test out this feature. You could wait the entire 20 minutes, however, I suggest that you temporarily set the time-out to 1 minute, for testing purposes. Do remember to switch it back.
Monitoring site suspension
ASP.NET App Suspend is a very significant change to the way ASP.NET apps are hosted in IIS. It comes with a big benefit to app startup and hosting density. We’ve tested it extensively in our performance labs and have been consistently impressed with how it performs. Please try it out and tell us how it works for you.