Keep VisualSVN Server Windows Service running 24/7

How to Keep your VisualSVN Server Windows Service Running 24/7 with Service Protector

Automatically restart VisualSVN Server whenever it stops, crashes or has trouble serving web requests. Ensure that your Subversion repositories are always available.

VisualSVN Server is a fully-functional Subversion server for the Windows platform. It's freely available for commercial use under the Community license.

VisualSVN provides a convenient HTML web interface to your repository. That functionality is hosted by the "VisualSVNServer" Windows Service:


To monitor & protect VisualSVNServer with Service Protector:

  1. If necessary, download, install, and configure VisualSVN Server.

    Ensure that the software works as you expect:

    VisualSVN Server Manager

  2. Download and install Service Protector, if necessary.

  3. Start Service Protector.

  4. Select Protector > Add to open the Add Protector window:

    Add Protector

  5. On the General tab, in the Service to protect field, select VisualSVN HTTP Service:

    VisualSVN Server Windows Service: General Tab

  6. To monitor and restart VisualSVN if it stops serving HTML pages, switch to the Monitor tab. We'll set up a failure detection batch file to detect when the VisualSVN web server runs into trouble.

    1. Follow these instructions to create the failure detection BAT file. We have called ours check-visualsvn-server-web-server.bat and placed it in the Service Protector installation folder (C:\Program Files (x86)\ServiceProtector).

      Note: In order to access a VisualSVN server web page, our URL includes a username and password that authenticates the request to the web server. Please be sure to consider the security implications in your environment if you take the same approach!

      Check Web Server Batch File

    2. Click the "..." button in the Whenever it fails a "sanity check" section to bring up the Configure Sanity Check window.

      Specify the full path to the batch file in the Run field.

      And change the Every controls to a frequency that works in your environment. More time means less frequent checks and less load on the server but with a reduced sensitivity to failures. 5 minutes is a happy medium for us, commencing 1 minute after the service starts:

      Configure Sanity Check

    3. Click the OK button to save your settings.

    Here's what the Monitor tab should look like when you're done:

    VisualSVN Server Windows Service: Monitor Tab

  7. Click the Save button to record your settings. In a few seconds, an entry for VisualSVN HTTP Service will appear in the Service Protector window.

    The green shield indicates that Service Protector is already actively monitoring the Subversion server to quickly detect and mitigate failures:

    VisualSVN Server Windows Service: Protected

  8. That's it! Next time your computer boots, VisualSVN will start automatically and Service Protector will babysit the service to promptly restart it if it terminates for any reason.

    We encourage you to edit your VisualSVN HTTP Service entry in Service Protector and explore the many other settings that may be appropriate for your Subversion environment. For example, send an email when the service fails, schedule a regular restart to cure memory leaks, tamp down the effects of CPU hogging, and much more.



Trouble protecting the VisualSVN Windows Service?