RavenDB is an advanced, transactional document database. It can be installed as a standalone Windows Service:
To monitor the RavenDB Windows Service with Service Protector:
install Service Protector, if necessary.
Start Service Protector.
Select Protector > Add to open the Add Protector window:
On the General tab, choose RavenDB from the list of services in the Service to protect field. The green circle indicates that RavenDB is already running...
To monitor and automatically restart RavenDB if it stops responding to HTTP requests (or returns a
dreaded 5XX/Internal Server error),
go to the Monitor tab where we'll set up a failure detection script that Service Protector will use to tell when RavenDB has failed.
Follow these instructions to create the failure detection BAT file.
We have called ours check-ravendb.bat and saved it in the RavenDB installation folder, C:\RavenDB.
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 you created, enclosing the whole value in quotes if it contains one or more spaces.
Change the Every controls to 5 minutes, or however often you wish to check RavenDB's web interface.
Press the OK button to save your sanity check settings.
We're now done configuring the essentials for RavenDB so click the Save >> button to record your settings. A new entry called RavenDB will show up in the Service Protector window.
RavenDB is probably already running but it is not yet being protected by Service Protector (hence the red shield). At this point, you can click on the green circle to see a few details on the RavenDB Windows Service
and its underlying process:
To start protecting RavenDB, choose Protector > Start "RavenDB".
The shield icon (which is clickable as well) will go to green to indicate that RavenDB is being actively monitored by Service Protector.
That's it! Next time your computer boots, RavenDB will start as normal and Service Protector will begin monitoring the service to quickly restart it if it fails or stops for any reason.
We encourage you to edit RavenDB in Service Protector and check out the many other settings that may be appropriate for your situation.
For example, send an email when the service fails, restart RavenDB during the early morning to diminish the effect of memory leaks, etc.
Trouble protecting the RavenDB Windows Service?