Performance

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 milliseconds

Why 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

  1. Record a profile from the server console and open it:
Config
profiler record 500
profiler view
  1. On the client, run resmon in F8 and look for resources above about 0.5 ms.
  2. Look for while true do loops without a Wait, or with Wait(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 .await in hot paths.
  • Save player data in small batches instead of all at once.