FiveM: finding the resource eating your server's CPU

What FiveM server thread hitch warnings mean, why resmon won't show server-side cost, and how to use FXServer's profiler to find the resource behind it.

PerformanceBy the ServerStats teamUpdated 5 min read

Questions

What does 'server thread hitch warning: timer interval of X milliseconds' mean?

FXServer's main server thread (svMain) went X milliseconds without completing its loop. Something blocked it: usually a resource doing heavy work in one go, sometimes the host's CPU or disk. A few rare ones are harmless; frequent ones with players online are not.

Can resmon show server-side resource usage?

No. resmon is a client command and shows the resources running on your own game client. For server-side cost use the FXServer console's profiler: profiler record, then profiler view or profiler saveJSON.

Does oxmysql cause hitches?

Queries through oxmysql's async API or its await functions don't block the server thread while the database works. Hitches come from what the script does around them: huge result sets processed in one go, big JSON encodes, or queries fired in a tight loop.

Does ServerStats show CPU per resource?

Not today. It records server, sync and network thread times and every hitch warning, entity counts per resource in deep mode, and resource starts and stops. Per-resource CPU needs FXServer's profiler, which costs CPU while recording, so it isn't run continuously.

Track hitches on your FiveM server

Free for one server, no card. About five minutes to install.