Skip to main content

The logs show the message [...] thread hitch warning

Examples of such messages:

  • [ citizen-server-impl] server thread hitch warning: timer interval of 225 milliseconds
  • [ citizen-server-impl] network thread hitch warning: timer interval of 400 milliseconds
  • [ citizen-server-impl] sync thread hitch warning: timer interval of 60 milliseconds

These are warnings about server performance and may affect player experience, gameplay smoothness.

Check hardware resources

To identify the cause of the problem, go to the Statistics tab in the panel and check if CPU and RAM usage is approaching the purchased limits. If there is no shortage of these hardware resources, the problem is with the FiveM scripts used.

Perform profiling

Go to txAdmin and type in the console:

profiler record 500 wait for profiling to complete

profiler save result to save the result to a file

profiler view result to view the result

You'll get a link that allows you to browse which script is causing the problem. The link can be opened in a browser. For the result to be useful, you need to catch the profiling when the [...] thread hitch warning message appears, meaning profiling must be running when this appears in the logs.

Final action

Once you identify the faulty script, you can either remove/disable it or try to optimize it.

Sources

https://docs.fivem.net/docs/scripting-manual/debugging/using-profiler/