Home
Releases
Discussions
Issue Tracker
Source Code
Stats
People
License
RSS RSS Feed
Search Wiki:
Project Description
A simple application that touches each site and site collection on a Sharepoint or WSS server to rebuild the IIS cache.
This project was inspired by the Warm Up script I found at: http://blogs.msdn.com/joelo/archive/2006/08/13/697044.aspx
For information about how the script was developed, please see my blog: http://akennel.blogspot.com/

Normally IIS discards its cache overnight, which means that each Sharepoint site must be rebuilt the first time it is accessed. This can be very slow. This script will seek out every site and site collection on a sharepoint server, and send them an HTTP request, so that the site remains in cache.
The application consists of the program file, spwakeup.exe and two optional configuration files, sites.conf and exclude.conf.
You must run this application on a machine that has WSS or MOSS installed.
If you want to wake up a single site, you do not need sites.conf and it can be safely deleted.
If you need to wake up mulitple sites, list them in sites.conf, each on their own line.
If you want to exclude a single site, you do not need exclude.conf and it can be safely deleted.
If you need to exclude multiple sites, list them in exclude.conf, each on their own line.

The app recognizes 5 option switches (the switches can appear in any order):
-verbose --Displays the raw HTML of each site as it is woken.
-site:XXX.XXX -- specifies the starting URL. If you do not set anything, the app looks for sites.conf, and uses the sites listed there. If sites.conf does not exist, the default URL http://localhost is used.
-exclude:XXX.XXX -- specifies a URL that should not be woken. If you need to exclude several sites, list them in a file name exclude.conf located in the same folder as spwakeup.exe.
-nodiscover -- Turns off discovery mode.
-log:Filename -- specifies a log file to record the results. If a file is not specified, the log will be displayed on the console.

Examples:
spwakeup.exe
If the file sites.conf does not exist, runs against http://localhost. Discovers all local web applications. Displays log results on console.

spwakeup.exe -site:http://portal.mycompany.com -exclude:http://portal.mycompany.com/MySites -log:c:\log.txt
Runs against http://portal.mycompany.com. Excludes the site http://portal.mycompany.com/MySites and all its subsites. For example, http://portal.mycompany.com/MySites/Site1 would be excluded. Stores results in c:\log.txt.
Last edited Sep 23 at 6:30 PM  by akennel, version 13
Comments
ryanj1 wrote  Apr 23 at 9:10 PM  
Thanks for your post. I am just curious as to why the depth parameter is necessary. In my testing I’ve found that if you warm up one site in the Web App, the entire web app is warm. Have you found different results where subsites need to be warmed individually? I am also trying to see if our IPMonitor tool can warm up the sites with its user experience monitor. So far the results are mixed. Have you had a chance to work with IPMonitor at all? Thanks.... Ryan

akennel wrote  Apr 24 at 9:43 PM  
Good question. When I first wrote this application, I was under the impression that each web page was assembled from its various elements the first time it was accessed: CSS, Images, the various Web Parts, &etc. Based on this assumption I created my little tool to crawl through the subsites to ensure that every page was touched.
My own testing, however, has borne out what you've found -- once a single site in the Web App is accessed, all the sites seem to be cached. I'd already written all the code to do the searching, so I just ignored this inconvenient fact and continued on. After all, touching all the other sites isn't a bad thing...it just seems to be pointless.
Just lately, I've been reading up on some cache options, the Site Collection Object Cache, and so forth. From what I understand, some of these options bring us back to the situation that I'd first envisioned -- each page needs to be access individually to get it into cache. I'm just starting to fine-tune some of these cache options on my own servers. I'll do some performance testing, and we'll see if there's any point to touching the subsites. I'll post what I find both here and on my blog: http://akennel.blogspot.com.

If it turns out that all you need to hit are one page per web app, I'll rewrite spwakeup accordingly. For now, you can just use the -depth:1 option to get something like the same result.

By the way, that brings up another question. Is there any desire for an option to find all the Web Apps on the current server? Right now you have to provide a list of Web Apps you want to check for Site Collections. Would there be value in just providing a server address and have spwakeup find all the Web Apps hosted on that server?

dbellando wrote  May 19 at 8:59 PM  
I placed the app in a directory and opened a command window and ran it. However, during the process, it seemed to start streaming text across the screen.. not sure if it was html or what... is this normal? Could something be wrong and damage the site?

frankok wrote  May 26 at 6:33 AM  
Hi Andrew,
I don't see any reason not to make the tool auto-discover the local web apps.
You could in fact make it as a parameter. I would probably make something like this:
[-autodiscoverwebapps true|false (Default is true. If set to false, then -site must be specified or sites.config must be present. Otherwise it will default to http://localhost.]

The benefit of using auto-discover, is that the tool will be easier to use right away, without the need to make manual adjustments.

Hope this helps.

Frank

frankok wrote  May 26 at 7:41 AM  
Another thing...
Could you please share with us the software requirements on this program? I'm currently using Visual Studio 2005, and got an error on System.Linq...

rserman wrote  Aug 25 at 4:21 PM  
I seem to be running into a problem every time I try to run spwakeup I get the following error:
Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot fin
d the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startIn
fo)
at SPWakeUp.Program.BuildSiteList(ArrayList list, Int32 depth)
at SPWakeUp.Program.Main(String[] args)

Any thoughts on what the problem could be?

Thanks

akennel wrote  Sep 13 at 5:47 PM  
Sorry to everyone for not answering these questions earlier. That's what I get for ignoring this project all summer.
frankok, just rem out the System.Linq reference. It's not needed, and I've removed it from the latest release. To be honest, I'm not sure how it got there in the first place. Good idea on finding all local web applications. I think I'll add that to the next version. If you don't mind, I'll use your -autodiscoverwebapps switch idea, too.

rserman, you neeed to have the 12 hive in your path in the pervious releases. If you get the latest version, this is no longer necessary.

dbellando, the text you saw was normal. When I first starting working on this project, I needed an easy way to see if the script was actually doing anything. At the time, I figured why not just stream the raw HTML as it comes back from the server? This made it easy to tell at a glance if the script was actually loading the sites. I'm nerdy enough to think it looked cool, so I never turned it off. In the new version, I've changed it so that by default the HTML doesn't stream, but you can turn that option back on if you like.

Updating...