How to auto-restart Windows Service upon failure
If you're one of those who is administering Windows as a web-server administrator or as a windows admin and you need to take some action upon failure of your windows-service then right click on service for which you want to set recovery go to "Properties > Recovery" and choose action for First, Second and Subsequent failures of the service.
Here we have following choices:
Take No Action: Generally the default action unless modified for any non-windows service we or other programs might have created. For crucial services like web-server (apache or IIS), we usually would like to take some actions instead of doing nothing.
Restart the Service: The best option for 90% of the services which don't required restart of computer and you still want that windows-service to get started again, then choose this option.
Run a Program: I believe this option can either help you draw user's attention (as service runs in the background) by popping-up some alert message or to either writing some logs and then manually restarting that service via that program or there can be any other possibility which I don't know.
Restart the Computer: In my opinion this is rather risky operation if you're running with business critical application where downtime of few minutes is not a good idea. But if failure of service is not recoverable by just the plain service-restart then one has to go with this less desirable option.
I hope this will help someone, who might be in need of help with this kind of situation.