![Service Protector 10: Advanced Sanity Checks for 100% Uptime Service Protector 10: Advanced Sanity Checks for 100% Uptime](/blog/images/software-update-500x135.webp)
After months of coding and testing, we released Service Protector 10.0 on May 10. Here’s a quick rundown of what’s new in this release:
Restart your Windows Service if a specific drive letter isn’t available
Does your Windows Service use files or folders on a mapped drive?
Or is your service responsible for mapping a drive letter?
If so, you should use Service Protector’s newest sanity check to detect when the drive mapping fails and promptly restart your service.
With Service Protector watching the drive, you won’t need to rely on calls from your customers to alert you of a problem. And you won’t have to dial in at all hours to fix your failing software.
How to monitor a drive mapping
The “check drive mapping” sanity check is very easy to use. For example, here’s how to verify that the P drive is always available:
Edit your service in Service Protector (or add a new one if you like).
Switch to the Monitor tab.
Check the Whenever it fails a periodic sanity check box and click the Set button to the right:
In the window that comes up, select the Check that a drive is mapped entry and click Next to proceed:
Select the “P” drive:
After clicking the Next button, specify how often Service Protector should check that the P drive is available. Every 5 minutes is probably good enough:
Finally, confirm that the sanity check is configured as you expect. Click Add if you’re satisfied:
Save your changes in Service Protector.
Click Next to continue.
And that’s it. With the sanity check keeping watch, Service Protector will automatically recycle your service if your drive mapping fails.
Set a timeout when checking that a HTTP/HTTPS web server is responding
The web server sanity check now accepts a timeout parameter, to indicate how long to wait for a response from the server before failing the request.
Why the change?
Previous versions of Service Protector waited indefinitely for the web server to answer. However, that caused a problem for a customer monitoring Microsoft’s IIS service.
For some unknown reason, his IIS would occasionally stop serving pages. When that happened, his users accessing the site from a browser would see an error indicating that the site was inaccessible. He configured Service Protector to check his site every couple of minutes and restart IIS if the URL stopped responding.
But it didn’t work! Service Protector reported that the service was functioning fine — even when the browser said otherwise.
After investigating, we figured out what was going wrong. IIS wasn’t refusing to serve web pages. It was returning the data just fine — but it was taking over 5 minutes to do so!
When IIS takes so long to respond, the browser gives up waiting and displays an error. That’s what the users were seeing.
But Service Protector would wait patiently for IIS to respond and declare the lengthy process a success. That’s why it wasn’t restarting IIS.
We introduced the new timeout option to fix the mismatch. You set the value (in seconds) right below the URL:
Once the customer configured a 30-second timeout, Service Protector was able to detect the sluggishness and promptly restarted IIS. Problem solved!
Easily test if your Windows Service has open TCP/IP network connections
You couldn’t easily test the TCP/IP network connections sanity check in previous version of Service Protector. Because of that, the Check now button was disabled.
Service Protector 10 activates the feature, allowing you to verify the selected service on demand:
You may find that helpful as you decide how to deploy the sanity check in your environment.
For example, here are the results of checking the Print Spooler Windows Service on our machine:
You can see that the Spooler service has an open listening TCP/IP connection, as expected.
Other fixes & improvements
To help with troubleshooting, Service Protector now shows the HTTP response and/or headers when manually running the web server sanity check. That way you’ll know exactly what is coming back from your web server, and you can configure the sanity check accordingly.
For example, here’s what Service Protector returned when checking our company website:
You can copy the text to the clipboard and make sure that the response is exactly as you expect.
Based on feedback from our customers, the web server sanity check now treats HTTP status codes 1XX and 3XX as success. Only status codes 4XX and 5XX are treated as errors that will restart your service.
We enlarged the text and icons on the taskbar tray menu, to improve readability:
As usual, please review the release notes for the full list of features, fixes and improvements included in Service Protector version 10.0.
Upgrading to Service Protector 10
If you purchased Service Protector version 9 (after April 2023), you can upgrade to version 10 for free. Simply download and install over your existing installation to preserve your existing services and all settings. That way, your registration code will continue to work.
If you bought Service Protector 8 or earlier (before April 2023), you will need to upgrade to use version 10.
Please buy upgrades here — at a 50% discount.
See the complete upgrade policy for more details.
Enjoy!