Skip to content

Commit

Permalink
Document watchdog server persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
PJB3005 committed Dec 31, 2024
1 parent 3d9838c commit 5514950
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/en/server-hosting/setting-up-ss14-watchdog.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,30 @@ If you are not already aware of how to use systemctl [now would be a good time.]

To view logs you can use [journalctl](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs) from now on.

## Server persistence

Modifying the watchdog's configuration or updating the watchdog requires it to be restarted, and by default, that means restarting all game servers running under the watchdog. Since commit [`6194ed4`](https://github.com/space-wizards/SS14.Watchdog/commit/6194ed481a6007949b7449dcf7140a1387e2ec2f), the watchdog now supports *server persistence*. This allows it to be independently restarted, without affecting the game servers themselves.

To configure this, you can add the following to your `appsettings.yml`:

```yml
Process:
PersistServers: true
```
With this set, the watchdog will not shut down game servers when it itself is being shut down, and will try to check for the previous game server process on restart, to resume watching them.
### Systemd
When hosting the watchdog as a Systemd service, the above is not enough. With Systemd's default settings, restarting the watchdog would cause Systemd to also kill the game server processes itself. This can be avoided by setting the following in your service definition:
```ini
[Service]
KillMode=process
```

This will make Systemd only stop the main watchdog process, without caring about the game server processes below it. This does, of course, mean that trying to `systemctl stop ss14-watchdog` will not stop game servers, even if they are misbehaving/stuck.

## General Troubleshooting

### Server keeps restarting every 30 seconds
Expand Down

0 comments on commit 5514950

Please sign in to comment.