Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have a web application that is not completely bulletproof, and on occasion the application pool will die off and not restart without user input. Once it is restarted, it will run just fine for days or even months. Is there a way to have it restart on its own? IIS seems quick to kill off app pools that it sees misbehaving. Ideally the web app would be improved but that is not up to me in this case.

share|improve this question

3 Answers 3

Assuming you have some sort of monitoring in place, can you have your monitoring software (re)start the app pool if it's not running?

Alternatively you could write a quick program/script to check check/restart the pool as needed and run it as a scheduled task.

share|improve this answer

You know that out of the box, IIS (6.0) restarts all app pools every 29 hours? So, unless you've changed the settings, it's restarting itself almost daily anyway. When it dies, if it does it every few weeks/months, it's not because it's been up too long since the last restart.

Under what criteria would you have for triggering the app pool restart? Do you only know when the users start calling? Are there any event viewer entries that you can trigger off of? You can also tell IIS to restart a given app pool after a certain amount of memory consumed or number of requests done - maybe you can hook up some monitoring and figure out a threshold that means you need to do this, and then either do it through IIS, or if the condition is more complex, then instrument an automated way to call iisapp.vbs /a NamedAppPool /r

/Edit - re-read the OP, and you're saying that the application pool actually stops, on its own, and won't restart without the user manually recycling it? There should definitely be an application or system event viewer entry for that - you may have to turn up your IIS app-pool alerting to see it or it might already be there.

share|improve this answer
    
Indeed it is showing up in the logs. The point is, I need to take that event and use it as a trigger to restart the app pool. –  Zimmy-DUB-Zongy-Zong-DUBBY Feb 2 '10 at 21:52
    
Then, using something that looks for that log entry, fire off a BAT that contains that iisapp.vbs line. –  mfinni Feb 2 '10 at 22:55

Is Rapid-Fail Protection stopping the app pool? If so, disable it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.