比IISReset命令的更文明的选择- 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>

 

来源:

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

http://blogs.msdn.com/joelo/archive/2007/07/16/iisreset-is-bruteforce-there-are-civilized-alternatives-iisapp-vbs.aspx

posted on 2010-03-23 12:15  中道学友  阅读(777)  评论(0编辑  收藏  举报

导航

技术追求准确,态度积极向上