> For the complete documentation index, see [llms.txt](https://conboi.gitbook.io/oms-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://conboi.gitbook.io/oms-wiki/addons/watchdog-essentials/low-tps.md).

# Low TPS

**Low TPS** is a critical feature provided by the `watchdogessentials` addon.\
It monitors server performance and **requests a controlled shutdown** if the server's TPS (ticks per second) stays below a defined threshold for a specified duration.

This feature is useful for protecting long-running servers from severe lag conditions that require a restart.

***

### Behavior

Once enabled, the feature:

* Tracks average server TPS over a configurable time window
* If the average TPS remains below the threshold, **requests a shutdown** using OMS

This does **not** restart the server by itself. You must use a restart script to bring it back online after shutdown.

***

### Configuration

Config file:

```
world/serverconfig/watchdogessentials-server.toml
```

```toml
[features.low_tps]
enabled = true
tps_threshold = 15
tps_averaging_window = "2m"
```

* `enabled` - turns the feature on or off
* `tps_threshold` - TPS value below which the server is considered too laggy
* `tps_averaging_window` - time window used to calculate the average TPS before evaluating the threshold

***

### Restart Script

Low TPS requests a controlled server shutdown through OMS.\
To bring the server back online automatically after the shutdown, run it using the **OMS restart script**.

See [**Restart Script Setup**](/oms-wiki/addons/operate-my-server-addon/scheduled-restart/restart-script-setup.md)

***

### Stop Reason

This feature introduces the stop reason:

{% @github-files/github-code-block url="<https://github.com/c0nnor263/OperateMyServer/blob/main/addon/watchdog-essentials/feature/low-tps/src/main/kotlin/io/conboi/oms/watchdogessentials/feature/lowtps/foundation/reason/LowTpsStop.kt>" %}

***

### Priority

This feature is registered with `Priority.CRITICAL`.\
It runs on every tick and has the authority to request shutdowns immediately.

***

### Source Code

This feature is part of the `watchdogessentials` addon.

{% embed url="<https://github.com/c0nnor263/OperateMyServer/tree/main/addon/watchdog-essentials/feature/low-tps>" %}
