Server thread hitch warning
The server froze for a moment. A few at startup are normal; constant hitches mean a script or the machine is too slow.
The error
server thread hitch warning: timer interval of 412 millisecondsWhy it happens
- A server script runs a heavy loop or a slow database query on the main thread.
- Large tables are saved all at once, for example every player on a timer.
- The machine is overloaded, or backups run while players are online.
How to find the cause
- Record a profile from the server console and open it:
Config
profiler record 500
profiler view
- On the client, run
resmonin F8 and look for resources above about 0.5 ms. - Look for
while true doloops without aWait, or withWait(0)on the server.
How to fix it
- Increase waits in loops and only run them when needed.
- Use async database calls (
MySQL.query,MySQL.update) instead of.awaitin hot paths. - Save player data in small batches instead of all at once.