<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

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

Published on
20,780 Points
9,680 Views
11 Endorsements
Last Modified:
Awarded
Community Pick
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 
               
11
Comment
  • 2
  • 2
5 Comments
LVL 10

Expert Comment

by:pramodsk40
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
0
LVL 5

Author Comment

by:georgekhalil
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
0
LVL 10

Expert Comment

by:pramodsk40
Can you give me example of heavy environments  and what if its accessed 24/7 ?
0
LVL 7

Expert Comment

by:bradgcoza
They have removed the BETA from the IIS website
0
LVL 7

Expert Comment

by:bradgcoza
@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
0

Featured Post

Acronis Data Cloud 7.8 Enhances Cyber Protection

A closer look at five essential enhancements that benefit end-users and help MSPs take their cloud data protection business further.

Join & Write a Comment

Basic Overview of office 365 user portal
Watch this simple and effective video tutorial to extract attachments from Outlook 2007 and try this easy method by yourself. No need to go anywhere, just watch the video and export attachments from Outlook in few simple steps. To know more, click h…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month