-
Download and install Service Protector, if necessary.
-
Start Service Protector.
-
Select Protector > Add to open the Add Protector window:
-
On the General tab, select the Redis service in the Service to protect dropdown. You will notice a green circle on the left if the service is already running, as pictured below.
-
If you are interested in monitoring Redis and detecting when it stops responding to network requests on its TCP/IP port,
click over to the Monitor tab. We'll set up a failure detection command to tell Service Protector when Redis is not accepting requests.
-
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 our ConnectToSocketSanityCheck.exe utility, which can be found in the "SanityCheck" folder inside your AlwaysUp installation directory, followed by "localhost" and your Redis port number.
If you installed AlwaysUp in its regular location and stuck with the default Redis port number (6379), the full command line to enter will likely be:
"C:\Program Files (x86)\AlwaysUp\SanityCheck\ConnectToSocketSanityCheck.exe" localhost 6379
Be sure to quote your exe path if it contains a space!
-
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 poking of the server), but it also means that errors can linger 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 Redis will show up in the Service Protector window.
Protection should have started and the shield icon should be green to indicate that Redis is being watched by Service Protector.
Your Redis service is now safe from accidental shutdowns!
-
Note that you can use Service Protector's icons to gain some insight into the Redis service and how it is being protected.
Click on the green circle in the "Service State" column to see key information on the Redis service itself:
Or click on the green shield in the "Protection" column to reveal a popup showing when protection started:
-
That's it! Next time your computer boots, Redis will start as normal and Service Protector will begin monitoring the service to promptly restart it if it fails or stops for any reason.
We encourage you to edit Redis 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, cycle Redis during the early-morning hours to keep performance snappy, restart the Redis service if it gets stuck starting, and much more.