|
How to Keep IIS Running 24/7 with Service Protector |
Automatically restart the IIS Windows Service when it crashes or encounters an error serving pages. Schedule a nightly restart, guard against memory leaks and keep your web sites operating smoothly
Microsoft's popular Internet Information Services (IIS) web server
provides the foundation for many Windows-based web applications. It is deployed as a Windows Service, as shown here in services.msc:
To protect IIS with Service Protector:
-
Download and install Service Protector, if necessary.
-
Start Service Protector.
-
Select Protector > Add to open the Add Protector window:
-
On the General tab:
-
In the Service to protect dropdown, choose the IIS service, named World Wide Web Publishing Service.
You will notice a green circle on the left if the service is already running, as pictured below.
-
If you are interested in monitoring IIS and detecting when it returns a 5XX error serving pages (or stops serving pages altogether),
click over to the Monitor tab. We'll set up a failure detection script to tell Service Protector when IIS has failed.
-
Follow these instructions to create the failure detection BAT file.
We have called ours check-iis.bat and placed it in the Service Protector folder, C:\Program Files (x86)\ServiceProtector.
-
Check the Whenever it fails a "sanity check" box and click the "..." button to open the Configure Sanity Check window. Enter the full path to the batch file.
Change the Every controls to 5 minutes or set it to any value that you find appropriate.
More time means less frequent checks (and less load on the server), but it also means that errors can go undetected for a longer period.
Press the OK button to save your sanity check settings.
-
Click the Save button. In a couple of seconds, an entry for IIS will show up in the Service Protector window.
IIS is probably already running but it is not yet being protected by Service Protector (as shown below).
-
To start protection, choose Protector > Start "World Wide Web Publishing Service".
The shield icon will go to green to indicate that IIS is being protected by Service Protector:
-
That's it! Next time your computer boots, IIS will start as normal and Service Protector will begin monitoring IIS to promptly restart it if it fails.
We encourage you to edit IIS in Service Protector and check out the many other settings that may be appropriate for your environment.
For example, send an email when the service fails, restart IIS during the wee hours to keep performance snappy, restart IIS if it hogs the CPU and much more.
Trouble protecting the IIS Windows Service?
|
Peace of mind for your important Windows Services!
|
|
|
Step-by-step guides for 70+ Services
|