Andrew Connell [MVP SharePoint]
1730 Posts |  46 Articles |  5281 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
AC's Blog Quick Links
SharePoint Quick Links
Article Categories
Archives
February, 2012 (4)
January, 2012 (12)
December, 2011 (6)
November, 2011 (3)
October, 2011 (17)
September, 2011 (8)
August, 2011 (6)
July, 2011 (7)
June, 2011 (13)
May, 2011 (9)
April, 2011 (15)
March, 2011 (1)
February, 2011 (6)
January, 2011 (5)
December, 2010 (11)
November, 2010 (6)
October, 2010 (12)
September, 2010 (5)
August, 2010 (4)
July, 2010 (5)
June, 2010 (6)
May, 2010 (11)
April, 2010 (11)
March, 2010 (9)
February, 2010 (9)
January, 2010 (3)
December, 2009 (10)
November, 2009 (15)
October, 2009 (15)
September, 2009 (7)
August, 2009 (4)
July, 2009 (10)
June, 2009 (8)
May, 2009 (2)
April, 2009 (9)
March, 2009 (6)
February, 2009 (16)
January, 2009 (6)
December, 2008 (12)
November, 2008 (12)
October, 2008 (27)
September, 2008 (13)
August, 2008 (14)
July, 2008 (14)
June, 2008 (12)
May, 2008 (23)
April, 2008 (12)
March, 2008 (15)
February, 2008 (13)
January, 2008 (12)
December, 2007 (10)
November, 2007 (8)
October, 2007 (15)
September, 2007 (20)
August, 2007 (21)
July, 2007 (16)
June, 2007 (8)
May, 2007 (25)
April, 2007 (16)
March, 2007 (18)
February, 2007 (18)
January, 2007 (12)
December, 2006 (16)
November, 2006 (13)
October, 2006 (18)
September, 2006 (22)
August, 2006 (27)
July, 2006 (23)
June, 2006 (23)
May, 2006 (23)
April, 2006 (9)
March, 2006 (17)
February, 2006 (15)
January, 2006 (23)
December, 2005 (31)
November, 2005 (32)
October, 2005 (38)
September, 2005 (53)
August, 2005 (30)
July, 2005 (63)
June, 2005 (30)
May, 2005 (59)
April, 2005 (29)
March, 2005 (74)
February, 2005 (27)
January, 2005 (22)
December, 2004 (32)
November, 2004 (42)
October, 2004 (39)
September, 2004 (20)
August, 2004 (14)
July, 2004 (27)
June, 2004 (40)
May, 2004 (5)
April, 2004 (6)
March, 2004 (16)
February, 2004 (26)
January, 2004 (23)
December, 2003 (7)
November, 2003 (14)
October, 2003 (20)
September, 2003 (4)
Post Categories
Add to Technorati Favorites

Managed Windows Shared Hosting

For those of you who are familiar with my SharePoint Warmup Job utility from SharePoint 2007, this is the new version rewritten for SharePoint 2010 that fixes some bugs & adds a few new features.

Those of us who present, demo or teach SharePoint 2010 have something in common. SharePoint is like any other ASP.NET application in that the first time you hit a page it has to JIT compile the page. Once that’s done, subsequent page hits are nice and quick as the JIT compiled page is cached. That is until the IIS application pool is recycled, something those of us SharePoint developers do a lot. The other challenge is that when we present, demo or teach, we might not be in one site for a while, but we want it to “stay alive” like people are using it.

I’ve created a utility that at scheduled intervals will issue an HTTP/HTTPS request to a specified site collection’s homepage, key galleries and key admin pages. This way while presenting, demoing or teaching, you can ensure that the most common pages in your sites are being warmed up and kept alive so when you go to do your demo it’s nice and quick.

Installation:

The installation process is pretty painless: run the batch file that will run the PowerShell file that adds and deploys the solution package. This will deploy an auto-activating Feature that adds a new link to Central Administration’s Application Management page:

SPSiteKeepAlive-1

Usage:

This page will allow you to select a Web application and then specify which site collections you want to keep warmed up and alive. You can optionally pick which popular pages you want the job to hit and the frequency they are hit.

SPSiteKeepAlive-2

There’s even a special case for Central Administration as different options are shown:

SPSiteKeepAlive-3

Two Important Notes:

  1. I’ve tested this in both the public SharePoint 2010 beta as well as the not so public Release Candidate. So far everything works as expected.
  2. My target audience includes developers and those who present, demo or teach SharePoint. I don’t think this is a “production” utility. Frankly, if you have trouble with your sites warming up, you have to ask yourself why you have no traffic. :)

Got any feedback on more features? Leave a comment on this post.

You can download the utility from the Critical Path Training Members Only section (look in the Code Samples section). You’ll need to be logged into our site to download it, but membership is free!

» Download AC’s SharePoint 2010 Site Collection Keep Alive Job Utility

[Update June 7, 2010] Updated to include extra logging in the SharePoint ULS and event log and fixed a few bugs. Details here.

posted on Saturday, March 27, 2010 11:58 AM

Feedback

# re: Introducing the SharePoint Site Collection Keep Alive Job 3/27/2010 1:30 PM Alex
Gravatar Why didn't this become a builtin feature? :-p

# re: Introducing the SharePoint Site Collection Keep Alive Job 3/27/2010 6:06 PM Joel Oleson
Gravatar Very cool.

I'll be downloading this. Keep demos warm is so important. You can only get away with blaming your laptop for so long.

Joel

# re: Introducing the SharePoint Site Collection Keep Alive Job 3/27/2010 9:32 PM Ryan Avery
Gravatar Andrew, thanks so much for this. I knew IIS was to blame, but did not know how to fix it. We have a lot of flash on our home page so the customer is always blaming the size of the flash. We will definitely implement this and let you know how it works.

Ryan

# re: Introducing the SharePoint Site Collection Keep Alive Job 3/27/2010 9:41 PM AC [MVP SharePoint]
Gravatar @Alex - Not really necessary as it's not a SharePoint thing. It's a perf aspectof ASP.NET.

@Ryan - Please think twice about using this in production. IIS is not the issue, nor is SharePoint. It's just how ASP.NET works. All this does is simulate one person hitting the site. If you hit the homepage and it's slow, then hit it again and it's fast, what you are doing the first time is init'ing the ASP.NET page JIT compilation. If your site is getting hit every few minutes then the JIT pages aren't falling out of cache. I guess what I'm saying is that this is not going to fix your problem... hence why I said it wasn't meant for production.

# re: Introducing the SharePoint Site Collection Keep Alive Job 3/29/2010 9:11 AM Tobias Zimmergren [MVP]
Gravatar This is pure Awesomeness mate, definately a superb thing to be running for all my demos and dev rigs!

Thanks.

# re: Introducing the SharePoint Site Collection Keep Alive Job 3/29/2010 9:59 AM Jeremy Thake
Gravatar Great work AC!

+1 to @joeloleson's comments...a warm VM keeps the demo gods at bay ;-)

# re: Introducing the SharePoint Site Collection Keep Alive Job 4/6/2010 8:55 AM Geoff Varosky
Gravatar Brilliant idea AC, thanks!

# re: Introducing the SharePoint Site Collection Keep Alive Job 7/22/2010 12:11 PM Justin Miller
Gravatar Does this run when a VM first starts up? Does the first warmup job run after the specified time after the timer service starts up?

# re: Introducing the SharePoint Site Collection Keep Alive Job 8/2/2010 8:54 AM AC [MVP SharePoint]
Gravatar Justin-
It runs when the timer job sees the job... that should be soon after the machine starts up. The timer job is a Win32 service
(OWSTIMER.EXE) so once he's running, it should start kicking in.

# re: Introducing the SharePoint Site Collection Keep Alive Job 8/9/2010 5:33 PM Raphael Londner
Gravatar Is this a timer job we can use for a medium or large farms with multiple WFEs to keep the site collections alive on all of the front-end servers?

It seems to me that each Timer Job runs only on one server at a time (I still don't really know how it picks the server it wants to run on), or am I wrong?

# re: Introducing the SharePoint Site Collection Keep Alive Job 8/13/2010 11:58 AM AC [MVP SharePoint]
Gravatar @Raphael - Technically yes you could, but it is in no way designed to do that. I intentionally built it to run on a single instance with only one server in the farm. I don't recommend running this in a production environment. Instead just let the system work like every other ASP.NET application and let it manage the JIT based on site usage.

# re: Introducing the SharePoint Site Collection Keep Alive Job 1/7/2012 7:43 PM Ahmed
Gravatar
Hi ,
can you help me please .

when i double click the .bat file under administrative privalege. i get the following error.


The term '.\SPSiteKeepAliveInstaller.ps1' is not recognized as the name of a cm
dlet, function, script file, or operable program. Check the spelling of the nam
e, or if a path was included, verify that the path is correct and try again.
At line:1 char:34
+ & {.\SPSiteKeepAliveInstaller.ps1 <<<< } -NoExit
+ CategoryInfo : ObjectNotFound: (.\SPSiteKeepAliveInstaller.ps1:
String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

I appreciate your help as i want to solve this problem urgently.

# re: Introducing the SharePoint Site Collection Keep Alive Job 1/25/2012 8:04 PM AC [MVP SharePoint]
Gravatar @Ahmed - Seems the PowerShell script file didn't make it in your download. The ZIP has three files: a batch file that calls a PowerShell script (*.ps1) and the WSP package.

Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 8 and 4 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelevant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2012 Andrew Connell
Creative Commons License 
This work is licensed under a Creative Commons License
Site design by Heather Solomon.

 
 
SharePoint 2010 Training
Looking for SharePoint 2010 training for developers, administrators, SharePoint Designer 2010 and end users? Look no further! My company, Critical Path Training offers the best SharePoint training around!