IIS app pool can be stopped on its own due to faulty code.

The next check box on the Health tab is the Enable Rapid Fail Protection check box. The idea here is that IIS can completely disable an application pool if there are a certain number of failures within a specific length of time. For example, by default if the worker process fails five times in five minutes, then the application pool will be disabled. The reason for doing this is that if a worker process is failing that often then there must be a serious glitch either with the system or with one of the Web sites within the application pool. IIS takes the application pool down in the interest of preserving the server’s overall stability.

The last two options on this tab aren’t really a big deal. They simply dictate the length of time that is acceptable for a worker process to startup and shut down. In the real world, I have never seen a worker process time out on startup or shutdown, so chances are that you may never have to touch these values.

Source: http://www.windowsnetworking.com/articles_tutorials/Working-Application-Pools-Internet-Information-Server.html

So actually when IIS app pool are stopped, the web remoting websites dependent on these app pool will be stopped too.

My boss said no it is remoting websites not related to app pool so app pool stops won't affect remoting.....LOL...laughing quietly to myself.

Published Sunday, February 03, 2008 4:52 AM by darenhan


# re: IIS app pool can be stopped on its own due to faulty code.

Thursday, February 21, 2008 3:20 AM by darenhan

This is a script that will loop thru all the application pools on your IIS 6 server, check the status of them and log the status of them. If a app pool is down it will log the app pool name and the time, restart the app pool and send an email out regarding the down/restarted app pool. You simple need to create a schedule task to run this script as often as you want.

' Variables that need to be defined for the script to work

Const LogDir = "C:\AppPoolLog"

ToAddress = ""

FromAddress = ""

showAppPools 'Runs showAppPools Sub

' This will get the list of all app pools on the server

Sub showAppPools

Dim obj,apool

set obj = GetObject("IIS://localhost/W3SVC/apppools")

for each apool in obj

apppoolStatus apool.name


set obj = nothing

End Sub

' This will get the status of the app pool

Sub apppoolStatus(apppool)

Dim obj

set obj = GetObject("IIS://localhost/W3SVC/apppools/" & apppool)

Select Case obj.apppoolstate

Case 0

writetoLog apppool,"0" 'Do not know what this status is

Case 1

writetoLog apppool,"1" 'Do not know what this status is

Case 2

writetoLog apppool,"Up"

Case 3

writetoLog apppool,"3" 'Do not know what this status is

Case 4

writetoLog apppool,"DOWN"

startapppool apppool

emailSendCDOSYS apppool

writetoLog apppool,"Restarted"

End Select

set obj = nothing

End Sub

' This will write information to a log file

Sub writetoLog(apppool,response)

Dim fso

lday = datepart("d",date)

lmonth = datepart("m",date)

lyear = datepart("yyyy",date)

logdate = lmonth & lday & lyear

set fso = CreateObject ("Scripting.FileSystemObject")

Set objFSOwriteline = FSO.OpenTextFile(LogDir & "\" & logdate & ".log", 8,True)

objFSOwriteline.WriteLine(response & "," & apppool & "," & now())


Set objFSOwriteline = nothing

set fso = nothing

End Sub

' This starts the down app pool

Sub startapppool(apppool)

Dim obj

set obj = GetObject("IIS://localhost/W3SVC/apppools/" & apppool)


set obj = nothing

End Sub

' This send a email regarding the down/restarted app pool

Sub emailSendCDOSYS(apppool)

Dim Mailer

Set Mailer=CreateObject("CDO.Message")

Message = "===============================================" & VbCrLf

Message = Message & "Application Pool: " & apppool & " has been restarted" & VbCrLf

Message = Message & "Date/Time: "& now() &"" & VbCrLf

Message = Message & "===============================================" & VbCrLf

Subject = "Application Pool: " & apppool & " has been restarted"

Mailer.TextBody = Message

Mailer.Subject = Subject

Mailer.To = ToAddress

Mailer.From = FromAddress


set Mailer = Nothing

End Sub

Source: http://forums.webhostautomation.com/archive/index.php?t-11141.html

Powered by Community Server (Commercial Edition), by Telligent Systems