アプリケーションプールをリモートでリサイクル


http://www.microsoft.com/japan/technet/community/columns/insider/iisi0505.mspx

アプリケーションプールをリサイクルするために、メモリの最大サイズや最大リクエスト数の閾値は設定できる。
だが・・・「リサイクルをしたいタイミング」は、それだけでは制御できなかったりする。


iisappをL7ヘルスチェックと組み合わせれば、想定外の障害に対応できるかもしれない。


C:\WINDOWS\system32>iisapp.vbs /?

C:\WINDOWS\system32>cscript iisapp.vbs /?
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Description: list IIS application pools and associated worker processes.
Recycle application pools.

Syntax: IIsApp.vbs [{ /a | /p } [/r] ]

Parameters:

Value Description
/a Specify an application pool by name. Surround
with quotes if it contains spaces.
If used alone without an accompanying action,
IIsApp.vbs will report PIDs of currently running
w3wp.exe processes serving pool .
/p Specify a process by process ID.�If used alone
without an accompanying action, IIsApp.vbs will
report the AppPoolId of the w3wp process specified
by . When a PID is specified with /r, that PID
is mapped to an application pool and the action is
taken upon the application pool.�If a PID is given
for a web garden, i.e. an application pool served
by more than one w3wp, then all w3wp痴 for that
application pool will be acted upon.
/r Recycles the application pool.

DEFAULT: no switches will print out the PID and AppPoolId.

Examples:

IIsApp
IIsApp /p 2368
IIsApp /a DefaultAppPool /r
IIsApp /p 2368 /r