Welcome to MSDN Blogs Sign in | Join | Help

IISReset is bruteforce, there are civilized alternatives (IISApp.vbs)

I know that bouncing IIS is something that Web Administrators in the past did a lot especially when rolling out new projects to release the memory and release/refresh the cache.  Worker process cycling schedules have reduced some of this, but there are still some cases where when you've rolled out a new project, feature, solution, etc... where you need to do this.

I'm sitting in Ted Pattison's WSS401 class and he has this line in his app and it reminded me there are simplier more civilized ways of doing things.

From the command line

      cscript c:\windows\system32\iisapp.vbs /a "%SharePointAppPool%" /r

Where %SharePointDefaultAppPool% is the app pool you are wanting to cycle.

Rather than doing a brute force IISReset which will cycle and effectively kill all app pools and cycle the process, this is iisapp.vbs is a civilized way of cycling the single app pool we are trying to cycle.

IISReset is 7 seconds on average and our civilized cycling for this single web app is 2 seconds.  It adds up, but it also leaves the other web apps alone.  I've been on some boxes where it was 30 seconds plus to cycle through, so you can see the value.... especially in a hosting situation where one need not be impacted by another.

<update 7/22/07>

Some comments have pointed out some work that Spence Harbar has done using the warm up script (remember that?) and combining it with cycling specific app pools in a little tray, (app pool recycle utility) very slick.  He says it's for developers, but I can see much larger possibilites... what do you think?

</update>

Published Monday, July 16, 2007 7:55 PM by joelo
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Monday, July 16, 2007 7:16 PM by pedropablo

# re: IISReset is bruteforce, there are civilized alternatives (IISApp.vbs)

Or you can use Spencer's nice "Application Pool Recycle Utility for SharePoint Developers"  - maybe he likes MS long product name marketing strategy :)

http://www.harbar.net/articles/APM.aspx

# Links (7/16/2007) &laquo; Steve Pietrek&#8217;s SharePoint Stuff

Tuesday, July 17, 2007 5:27 AM by Philippe

# re: IISReset is bruteforce, there are civilized alternatives (IISApp.vbs)

There is also a nice application at this URL : http://www.harbar.net/articles/APM.aspx that will let you recycle, reset and warmup your stsadm and SharePoint site/application in one click.

Wednesday, July 18, 2007 4:46 PM by joelo

# re: IISReset is bruteforce, there are civilized alternatives (IISApp.vbs)

Thanks Philippe, Nice.  Good job Spence.

Tuesday, July 24, 2007 4:22 AM by Spence

# re: IISReset is bruteforce, there are civilized alternatives (IISApp.vbs)

Hey Joel!

The latest version doens't need the warm up scripts and does the GET work directly from managed code.

s.

Wednesday, July 25, 2007 3:27 AM by joelo

# re: IISReset is bruteforce, there are civilized alternatives (IISApp.vbs)

Thanks Spence.  I think it's a very slick tool.  I do like the warmup option, you've been great about the feedback you've received.

Great work!

Wednesday, July 25, 2007 4:46 AM by Spence

# re: IISReset is bruteforce, there are civilized alternatives (IISApp.vbs)

Thanks for the positive feedback!

I'm hoping to get a new version done shortly which improves things a little (associations) and add support for VS post build events (a non GUI option).

Tuesday, July 31, 2007 4:06 PM by Marc T

# re: IISReset is bruteforce, there are civilized alternatives (IISApp.vbs)

How do you recycle app pools remotely?  Suppose I am building an app on a build server, deploying it to a testserver, and I want to recycle the app pool on testserver from my buildserver (via a build/deploy script)?  Using unc doesn't work, as you don't really reference an apppool via \\testserver\apppoolname (or pid), at least not that I know of.

Tuesday, July 31, 2007 5:21 PM by Piensa SharePoint

# HOW-TO: Site Definitions

Introducción Vamos a elaborar una plantilla o definición de sitio de acuerdo a las necesidades de la

Tuesday, August 07, 2007 10:23 AM by Mirrored Blogs

# Page File on the server too high? Alternative to IISRESET

I&#39;ve already been explaining in my previous post about application pools how to save on page file

Monday, October 29, 2007 3:30 AM by Joel Oleson's SharePoint Land

# SharePoint App Pool Settings

Talking to a buddy on Friday, the post he said he actually read was one I must have posted on 2003. I

Monday, November 19, 2007 6:33 AM by On the MOSS Road

# Let's be more civilized with IIS

Nowdays I working on a webpart which its DLL throwing in GAC and every time I change border color or...

Wednesday, January 23, 2008 7:24 PM by Mirrored Blogs

# MOSS: Debugging

The debugging process in MOSS is challenging, to say the least, especially if your &quot;development&quot;

Thursday, April 23, 2009 3:55 PM by stefan.stanev

# some tips to develop with less iisreset-s

I compiled a small collection of tips for less iisreset-s while developing SharePoint stuff.

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker