Warming up an IIS Application Pool automatically?

16,721

Solution 1

I have answered a similar on StackOverflow.

Microsoft moved the warmup feature to IIS 8, but they have also released the Application Initialization Module for IIS 7.5 as a separate download.

The feature I think is most compelling is that this module also enables overlapped process recycling. The following tutorial from IIS 8.0 include a step-by-step approach on how to enable overlapped process recycling.

Solution 2

How about the Autostart feature - does that accomplish what you're looking for? Short of that, you could script something in the OS startup to make that first HTTP call on server startup - you'd want the script to know that (or wait for) IIS is up and responding before firing the request. Here's some ideas for those scripts. In fact, there's a lot more content for this topic over on SO than here on SF.

Solution 3

You can follow these steps:

  1. Edit %WINDIR%\system32\inetsrv\config\applicationHost.config
  2. In the <applicationPools> tag, find the relevant app pool of your site and add the attribute: startMode="AlwaysRunning".
  3. Add the attribute preloadEnabled="true", like this: <sites> -> <site> -> <application preloadEnabled="true">

Don't forget to backup the file before the changes.

Solution 4

have a look ath this post: http://blogs.msdn.com/b/amol/archive/2013/01/25/application-initialization-ui-for-iis-7-5.aspx

It worked for me, I needed to activate a web application automatically since it hosted a net.Tcp WCF service that, when called , would not start the application up since this happens only when using the HTTP protocol. Yuo download the tool and after installing it you'll have an additional applet in IIS manager to handle application initialization for applications and sites. Remember to order the applets by name since it can be useful to spot in the myriad of icons in IIs manager....

Share:
16,721

Related videos on Youtube

Michael Stum
Author by

Michael Stum

The same thing we do every night, Pinky. Try to take over the world! Full-Stack Developer on Stack Overflow Enterprise, working to make our little corner of the Internet better for all of us.

Updated on September 18, 2022

Comments

  • Michael Stum
    Michael Stum over 1 year

    So IIS likes to shut down app pools that aren't in use. While this makes sense, I would like to have certain app pools conterminously running, but I don't want to just disable the automatic app pool restart as some of the settings (e.g., maximum memory limit) are good to have.

    I know that Microsoft announced the IIS Application Warmup module as an IIS 7.5 feature only then to do a Bait & Switch and pull it again so that they can put it in IIS 8 instead, so I wonder if something exists to run on IIS 7.5/Windows 2008 R2?

    • mfinni
      mfinni about 12 years
      Just to be argumentative for a moment - I don't see it as a bait-and-switch, because you don't buy IIS as a product anyway. Plus, wasn't it always marketed as a beta?
    • Ov's Pianist
      Ov's Pianist about 12 years
      In the meantime, if your app is stable (i.e. doesn't leak memory), you can disable the recycling limits for it - turn off the 20 minute Idle recycle (which happens if your app isn't used for 20 minutes) and the 29 hour default recycle interval.