Warm up your SharePoint Web Applications on Windows 2008 R2 using the IIS 7.5 Application Warm-Up module

AID: 2643
  • Status: Published

9340 points

  • Bygeorgekhalil
  • TypeTutorial
  • Posted on2010-03-09 at 20:50:01
Awards
  • Community Pick
  • Experts Exchange Approved
I have just recently built a new SharePoint 2007 farm on a complete Windows 2008 R2 server platform and part of my standard build procedure is to implement a warm up routine, usually in the form of a script that is scheduled every morning to launch my SharePoint Web Applications.  Most of you will most likely know what I am referring to here, the slowness that end users experience when loading a SharePoint site for the first time in the morning!?

By default IIS will recycle its worker processes during the night, in my case IIS 7.5 tells me this happens at 1:04 AM.  You can locate this information in IIS Manager / Application Pools / Highlight your application pool in question and select Recycling under Actions / Edit Application Pool.

 

So what is recycling all about?  Here is a brief primer;

Recycling is all about stopping any current w3wp.exe processes that are running for a particular Web Application Pool and starting a new one.  The purpose of this maintenance routine is to clear the cache and start afresh! This routine obviously causes SharePoint to be quite slow when accessed for the first time after the recycling process.  This is because when accessing a SharePoint Site/Page for the first time, that information needs to be re-compiled and loaded into memory again.

So what can we do about this first time slowness that occurs every morning?  Wake SharePoint up!

There are an array of scripts that have been developed by 3rd party developers that can be scheduled to run straight after the recycle occurs.  These scripts are usually required to be modified for your Web applications in question.

With the introduction of IIS 7.5 and Windows 2008 R2 however, there is an actual module developed by the IIS team that will integrate directly with IIS allowing you to seamlessly enable your application pools to load your web applications after a recycle occurs.  You can download the extension here; http://www.iis.net/expand/ApplicationWarmUp At the time of this writing, the Application Warm-Up module is still in beta, but I have been using it on our production servers for over a month without any hiccups.

So let’s begin our step by step guide.  Download and launch the executable from the above site.

Click Install and then click Finish.  As you can see, the installation process is quite simple.

Launch IIS Manager and click on one of your SharePoint Sites.  In the middle pane, you will notice a new item listed under IIS titled, Application Warm-Up.

 

Double Click on Application Warm-Up.

Under Actions located on the far right pane, select Settings

Ensure that both options available are selected and ticked.

We also now need to add a request which is usually the main page of your SharePoint Site.  This is achieved under Actions, Select Add Request and enter the URL of your SharePoint Site.

 

The last area that you will need to venture into is also located under Actions / Edit User Context.  Here you will need to specify your Authentication settings, otherwise the module will not work and you will receive the below warning message in your Windows Application Even Log.

Log Name:      Application
Source:        IIS Application Warmup Module
Date:          8/03/2010 7:31:43 AM
Event ID:      1003
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      SERVERNAME

Description:
The description for Event ID 1003 from source IIS Application Warmup Module cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

/default.aspx
MACHINE/WEBROOT/APPHOST/SharePoint Central Administration v3/
Unauthorized

Here I have specified “Set Username and Type only” for the mode and “Windows” for the Type.  Lastly, specify an account that has access to load the SharePoint Web Application.

That’s all that is to it.  All you need to do now is replicate this for each SharePoint Web application on each of your SharePoint Web Front Ends.

This neat little module has a number of advantages over scheduled scripts as it seamlessly warms up your SharePoint Web applications regardless of when the Application Pool is recycled including when you re-start your servers or re-start IIS.  Please note, this little module also works with all ASP.Net applications!

Before I let you go, if you are after a neat utility for IIS7, Spencer Harbar has developed an Application Pool Recycle Utility which also incorporates a Warm Up tool  You can download it here; http://www.harbar.net/articles/apm.aspx

Resources

IIS.Net – Application Warm up http://www.iis.net/expand/ApplicationWarmUp

IIS.Net – Using the IIS Application Warm-Up Module http://learn.iis.net/page.aspx/688/using-the-iis-application-warm-up-module/

http://sharepointgeorge.com
               
Asked On
2010-03-09 at 20:50:01ID2643
Tags

SharePoint

,

Windows 2008 R2

Topic

MS SharePoint

Views
2754

Comments

Expert Comment

by: pramodsk40 on 2010-07-16 at 20:26:39ID: 17080

george,

Its a nice article by the way. But i have a question why do I need to recycle the app pool. I know its checked by default. If my web application is a site which is accessed 24/7, i would uncheck it for performance reasons. Our websites are running perfectly fine with the option unchecked.

Can you give me a good reason why I should leave it checked ?

Thanks,
Pramod

Author Comment

by: georgekhalil on 2010-07-16 at 22:45:09ID: 17081

Hi Pramod,

Thanks.  Recycling is beneficial in heavy environments and since applications do not always properly dispose of objects and free up memory, recycling the application pool is necessary in order to achieve this.  

Cheers

Expert Comment

by: pramodsk40 on 2010-07-17 at 08:26:01ID: 17093

Can you give me example of heavy environments  and what if its accessed 24/7 ?

Expert Comment

by: bradgcoza on 2011-06-01 at 02:55:26ID: 27879

They have removed the BETA from the IIS website

Expert Comment

by: bradgcoza on 2011-06-01 at 02:57:33ID: 27880

@pramodsk40 if your enviroment is large enough you should have multiple web frontends.  The idea would then be to schedule maintenance mode everyday on each one of the WFE and remove it from the NLB then run to warmup scripts and place it back on to the NLB fresh and ready for action.  This will then not affect users and the server will constantly be ready.

Come to think of it though, if the servers are used 24/7 it wont need to a warmup script as it is already warm so to speak

Add your Comment

Please Sign up or Log in to comment on this article.

Join Experts Exchange Today

Gain Access to all our Tech Resources

Get personalized answers

Ask unlimited questions

Access Proven Solutions

Search 3.2 million solutions

Read In-Depth How-To Guides

1000+ articles, demos, & tips

Watch Step by Step Tutorials

Learn direct from top tech pros

And Much More!

Your complete tech resource

See Plans and Pricing

30-day free trial. Register in 60 seconds.

Loading Advertisement...

Top MS SharePoint Experts

  1. ACH1LLES

    358,298

    Wizard

    0 points yesterday

    Profile
    Rank: Genius
  2. JamieMcAllister

    189,161

    Guru

    0 points yesterday

    Profile
    Rank: Sage
  3. teylyn

    170,328

    Guru

    900 points yesterday

    Profile
    Rank: Genius
  4. ivan_vagunin

    156,400

    Guru

    0 points yesterday

    Profile
    Rank: Sage
  5. QPR

    123,685

    Master

    2,000 points yesterday

    Profile
    Rank: Genius
  6. Tehzar

    100,639

    Master

    0 points yesterday

    Profile
    Rank: Guru
  7. svetaye

    75,681

    Master

    0 points yesterday

    Profile
    Rank: Guru
  8. tedbilly

    71,150

    Master

    0 points yesterday

    Profile
    Rank: Genius
  9. quihong

    52,832

    Master

    0 points yesterday

    Profile
    Rank: Sage
  10. dp_expert

    49,160

    0 points yesterday

    Profile
    Rank: Wizard
  11. colly92002

    41,560

    0 points yesterday

    Profile
    Rank: Master
  12. clayfox

    39,400

    0 points yesterday

    Profile
    Rank: Genius
  13. milindsaraswala

    36,835

    0 points yesterday

    Profile
  14. RainerJ

    31,840

    1,000 points yesterday

    Profile
    Rank: Master
  15. abhitrig

    31,218

    0 points yesterday

    Profile
    Rank: Wizard
  16. dhawalseth

    30,268

    0 points yesterday

    Profile
  17. ImaCircularSaw

    29,438

    0 points yesterday

    Profile
    Rank: Guru
  18. martusha

    25,478

    0 points yesterday

    Profile
  19. zephyr_hex

    21,624

    0 points yesterday

    Profile
    Rank: Genius
  20. FastFngrz

    21,414

    0 points yesterday

    Profile
    Rank: Guru
  21. livanescu

    20,100

    0 points yesterday

    Profile
  22. danshady

    18,870

    0 points yesterday

    Profile
  23. CloudedTurtle

    18,050

    0 points yesterday

    Profile
    Rank: Master
  24. jessc7

    17,102

    0 points yesterday

    Profile
    Rank: Sage
  25. JoeKlimis

    16,318

    0 points yesterday

    Profile
    Rank: Master

Hall Of Fame