# 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_count_time = "2m"
```

* `enabled` - turns the feature on or off
* `tps_threshold` - TPS value below which the server is considered too laggy
* `tps_count_time` - how long TPS must remain below the threshold to trigger shutdown

***

### Restart Script Optional

This feature only shuts the server down.\
To enable full restart behavior, pair it with a proper launch script.

See - [Restart Script Setup](/oms-wiki/addons/operatemyserver-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>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://conboi.gitbook.io/oms-wiki/addons/watchdog-essentials/low-tps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
