TechTips - Application Pool Recycle Utility for SharePoint Developers

TechTips
Working with SharePoint 2003, 2007 and probably 2010 in the near future has made me well aware of the tools and resources on the internet that are available to me to help administer the monster I know as MOSS 2007. I have found another awesome tool that can be used for many different admin functions within SharePoint, and as usual it's totally free!

The program I am referring to is called APM (Application Pool Manager) which is a freeware application designed to provide quick access to the most common tasks for SharePoint within IIS. It isn't limited to only helping SharePoint administrators, anyone who works a lot in IIS might find the tool useful but for the purpose of this article and what I want to do with the APM, it will be for SharePoint.

The program still has its bugs but for the most part for what I use it for, it works rather well. I run the 2.0 version of the program on an entirely Windows Server 2003 environment with IIS 6. I have to stick to the older version (there is a 3.0) because the newer version only works with IIS 7 and SharePoint 2010 which I don't run either of.

So basically the program does two things and does them very well, and helps me a lot with my SharePoint 2007 Farm. First it bounces IIS websites (meaning recycles app pools) and it also warms up my SharePoint sites (meaning it hits the page so it compiles the code, making it load faster for anyone else who hits it, i.e. customers from the outside world).

I will give you steps for setting up the program, preparing the two functions I use, and actually using the functions so that you can use APM to keep your SharePoint sites or Farm running smoothly.

First let's download and install the program from harbar.net make sure if you are like me with a 2003 server setup you download the 2.0 application. If you are on 2008 server and have SharePoint 2010 you can download the 3.0 and try to follow my instructions but I am not sure if they will apply to the updated software. When you download the program it will be in the form of a Zip file, unzip it to the location you want, I put it on the root of my C:\ on the server that I host my websites on for my SharePoint Farm. If you need a good tool to unzip the file, try 7-Zip it works great and its free!

Once the program is unzipped you will want to double click the Icon labeled APM2.exe, which will open the program and should populate with all of your Application Pools that you have on the server. Now you will see an icon in the lower right hand corner (The Tray) you can right click on this and run almost all of the options we will want to use within APM. There are some great quick options like under the services option you can do an IIS Reset, Restart the WSS Timer Service and Restart the WSS Admin service, all helpful options that as a SharePoint admin I frequently need to do, this helps me to do them with a single click!

Also if you want to recycle and Application Pool all you have to do is right click your APM icon in the Tray and click on the name of the Application Pool; it will then also warm up your sites. There is also an option to refresh all Application Pools at once, in case you want to do them all at once.

So you know how to recycle the application pools using the APM but now there is a little configuration we need to do for the second part of APM that I like. You will see a check box labeled Warm Up after Recycle or IIS Reset, it is checked by default and the window below it has a URL (http://sample/) in it. This is where you will want to add all of your SharePoint sites, and each time you recycle an application pool or Reset IIS all of your sites will be "warmed up" so that loading times for external users will be faster. You will set these up in a comma delimited format, so here is an example of what my list looks like:

https://sharepoint1/, https://sharepoint2/, https://sharepoint3/

There is also an option to run the STSADM during the warm up but I leave this off. I am not sure what command in the STSADM is used here but I don't want to find out either.

So now when I want to quickly recycle and application pool or reset IIS I can use my simple quick APM tool, once it does the recycle or reset then it warms my sites so that my users get to the pages faster. I do a lot in IIS through the day and this tool helps me shave some time off my admin duties. I hope the program helps you out as much as it helps me.

Published by TechTips

I am a senior systems engineer and enjoy writing articles about computers, technology and other electronics.  View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.