# Watchdog

#### General

Server *Watchdog* is an important part of the Macula software. It runs as a separate Windows service and protects the software from certain types of failures by automatically attempting to restart the server.

Watchdog operates based on the software and system overall health monitoring; default trigger values have been selected on the grounds of our analysis of extensive tests run on systems of different configuration and stability level.

Although it is possible to disable the *Server Watchdog* service, we strongly advise against doing so, as the principal role of Watchdog is to keep the software operation as stable as possible in the given circumstances.

Watchdog operation can be tracked by messages in the Windows Application log and in the software Audit log. If you do experience frequent disturbances such as software restarts or server rebooting, this will be an indication of some serious issue related to the software, operating system and/or underlying hardware. In such a situation, the best course of action is to:

* carefully read the messages in the Windows Application Log, as these may already contain some indication of why Watchdog was triggered;
* refer to the relevant topic in the Troubleshooting section of this manual to read about typical causes of such cases;
* send a Problem Report from the faulty server, providing as much information as possible about the issue;
* consult the GSF technical support team directly via <support@gsfcorp.com>.

#### Configuration

Watchdog operation can be configured for each server independently. To access Watchdog settings, in Macula Console select *Configuration* in the bottom left menu and select *Servers* from the list on the left, then double-click the desired server or simply click *Edit* button on the top panel for the pre-selected server.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FJCwcUnakdrMd06VjQhH1%2Fimage.png?alt=media&#x26;token=da09de1e-2013-479b-918a-0e275bb4a897" alt=""><figcaption></figcaption></figure>

In the Server dialog box, select Watchdog from the left menu.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FH5ZvXmh0PCdoF5400DDe%2Fimage.png?alt=media&#x26;token=5e0e1745-d2fe-480b-9868-8a3420a38c76" alt=""><figcaption></figcaption></figure>

The table below contains a detailed explanation of Watchdog settings. Please note that for most cases default and near-default settings are recommended; it is advisable that you consult with GSF support if for some reason you plan to make extensive changes to these settings. Click the information icon next to each setting to read more about them.

<table><thead><tr><th width="188">Setting</th><th>Description</th><th>Default Value</th></tr></thead><tbody><tr><td>Enable Watchdog</td><td>Enables Watchdog operation for the target server</td><td>Enabled</td></tr><tr><td>Grace Interval, seconds</td><td>Time interval in seconds, counting from server start, during which Watchdog will not attempt to restart the software</td><td>30</td></tr><tr><td>Reboot Interval, minutes</td><td>Watchdog will reboot Windows if there have been a certain number (N) of software restarts (N is specified below) in the given time interval; the default for rebooting is 3 restarts in 5 minutes; setting the specified number to 0 will disable rebooting</td><td>5</td></tr><tr><td>Number of Failures to Reboot</td><td>Watchdog will reboot Windows in case there have been N software restarts in the time interval specified above; the default for rebooting is 3 restarts in 5 minutes; setting the specified number to 0 will disable rebooting</td><td>3</td></tr><tr><td>System Committed Memory Usage Ratio, %</td><td>Watchdog will restart the software if the ratio of total system committed memory exceeds the specified percentage; this value is shown under Memory section of Performance tab in the Windows Task Manager</td><td>Enabled, 70%</td></tr><tr><td>System Pool Nonpaged Memory Usage, MB</td><td>Watchdog will restart software if the amount of system nonpaged pool memory exceeds the specified amount</td><td>Disabled</td></tr><tr><td>Private Memory Usage Ratio, %</td><td>Watchdog will restart software if the amount of private memory used by server process exceeds the specified value</td><td>Enabled, 45%</td></tr><tr><td>Virtual Memory Usage Ratio</td><td>Watchdog will restart software if the amount of virtual memory used by server process exceeds the specified ratio; ratio shows the amount of virtual memory used by server process versus maximum per-process virtual memory allowed by OS</td><td>Enabled, 90%</td></tr><tr><td>Enable Periodic Restart</td><td>Enables automatic software restart every N days or hours; use hours for troubleshooting purposes</td><td>Enabled</td></tr><tr><td>Restart interval</td><td>Choose between every N weeks, days, or hours; use hours for troubleshooting purposes</td><td>1 week</td></tr><tr><td>Weekday</td><td>Restrict periodic restart to specific day of the week</td><td>Sunday</td></tr><tr><td>Enable Periodic Restart Hours</td><td>Limit periodic restart to specific hours, e.g. only restart at night; we recommend to leave at least a 1h interval for the restarts</td><td>Disabled</td></tr></tbody></table>

Up to software version 1.22, the *System Committed Memory Usage Ratio* was equal to 70% by default. Afterwards, it has been changed to 95% for a more optimal usage of system resources.

If you choose to limit the periodic restart time to specific hours or weekdays, the watchdog service will attempt to restart the main service straight away (at the very beginning of the allowed interval). If the watchdog does not succeed for some reason, it will continue to try until the end of the period, and then the next attempt will only take place when the next safe period begins. For example: if the restart is limited to 00:00-08:00 on Sundays, you should typically expect the restart at 00:01 on Sunday; if the watchdog was manually stopped before that time and started at 08:30, the following periodic restart would not happen until next Sunday at 00:01.

{% hint style="info" %}
Macula 1.27 Update: The *Server Watchdog* now automatically monitors the *Streaming Server*, enhancing system stability and reliability. This integration ensures uninterrupted streaming and improved performance, with no additional settings required.
{% endhint %}
