Fixing server thread hitch warnings
“server thread hitch warning: timer interval of 312 milliseconds” is one of the most common lines in a FiveM console. It means one server tick took far longer than it should, and players feel it as rubber-banding, delayed doors and late damage. A few at startup are normal; a steady stream during play is a problem with a findable cause.
Short answer: A hitch warning means the server thread was blocked for the number of milliseconds shown. Ignore hitches during startup and resource restarts. If they happen during play, record the profiler while they occur (profiler record, profiler view) to find the resource, look for synchronous work (heavy loops, blocking queries, large file I/O, big JSON encodes), and check the host for CPU steal or overload.

#What the warning means
The server runs its game logic in ticks. When a tick takes much longer than the normal interval, FXServer prints a hitch warning with the actual interval. Similar warnings exist for other threads (network, sync). Players cannot be updated while the thread is blocked, so movement and events arrive late.
| Situation | Worry? |
|---|---|
During server start or restart <resource> | No — loading is expected to block |
| Once after a large database migration | No |
| Every few minutes at peak time | Yes — profile it |
| Constantly, even with few players | Yes — likely a script or the host |
#Find the cause with the profiler
profiler record 500
# wait for it to finish (or reproduce the hitch)
profiler viewThe profiler records a number of frames and opens a timeline showing which resource and function consumed each tick. Look for the long frames and what ran inside them. Full walkthrough: the profiler guide.
#Common causes
| Cause | Fix |
|---|---|
| Loops over all players/vehicles every tick | Run them every few seconds and spread work over ticks |
Huge json.encode of player data on save | Save only changes; stagger saves |
Synchronous file I/O (SaveResourceFile in loops) | Batch writes, use the database |
| Slow queries (missing indexes) | Add indexes — see database design |
| Mass entity spawning at once | Spawn in batches with small waits |
| Overloaded or noisy VPS | Check CPU steal/usage; upgrade — see hardware |
#Is it the host?
If the profiler shows no single heavy resource but hitches persist, look at the machine: on Linux run top and watch the st (steal) value — high steal means other customers on the same host take your CPU. The database competing for CPU, backups running at peak time and antivirus scans on Windows cause the same pattern.
#A fix plan
- Note when hitches occur (time, player count, what was happening).
- Record the profiler during that moment.
- Fix or replace the resource responsible; retest.
- If nothing stands out, check host CPU and move heavy jobs (backups) off peak.
- Keep an eye on resmon during play — see server performance.
Questions
What does server thread hitch warning mean?
Are hitch warnings at startup a problem?
How do I find which script causes hitches?
profiler record while the hitches happen and inspect the result with profiler view.Can bad hosting cause hitch warnings?
Ready to pick a map?
Twelve themes on three base map styles, $8 each, instant download.