[NEED HELP] Server lag - hitch warning error



Hello everyone! I need some help. I just released my new RP server and I cant figure out what is causing this error.
My server is running ESX framework, essentialmode 5, mysql-async, esplugin_mysql, es_extended, its working great, no errors, just lag.

Basically when the server gets 20/25 players, after some time it start to lag a lot! The server console its like this

hitch warning: frame time of 1260 milliseconds
hitch warning: frame time of 860 milliseconds
hitch warning: frame time of 260 milliseconds
hitch warning: frame time of 460 milliseconds
hitch warning: frame time of 1060 milliseconds
hitch warning: frame time of 560 milliseconds
hitch warning: frame time of 260 milliseconds
-- just an example

I had a rented server (shared) and I thought that was the problem of this. Today I rented a dedicated server and when I joined the server it was like heaven, even when I was alone I felt the diference.
I made some tests and then when I released the server it was really good, no lag, no errors at all! And basically after some time (15/25min) the lag appears again. The same thing, starts the “hitch warning” spam and players getting kicked off, getting time outs…
Im really sad about this because I feel like I cant solve my problem. If anyone can help me I would really appreciate it!!

Any aditional information that you need, comment below and I will provide you the info. Have a nice day


You either have a script that’s poorly written which causes the main thread to be blocked, or your dedicated server isn’t powerful enough to handle the amount of players you have.


Its not the dedicated server, I believe. Can you tell me what type of script can make this lag? I belive its not any script related to jobs, shops, garages… I can post a server log if you need it, and thanks for your reply!


Any script could be the cause, there’s no way to tell unless you disable them all and enable them one by one to find the source. For a control test just run a fresh server, tell all your friends to join, play for the 15-20 minutes you talked about earlier and see if the server still runs fine after that or if it also starts to lag.


Alright, I will do that and then report the result. Thanks


I found the problem, by accident. Basically someone joined the server and I got a lot of errors because of his identifier. Instead of giving the steam identifier(steam:xxxxxxx), the player was giving the FiveM identifier (license:xxxxxxx). In that errors I found 2 scripts, esx_status and esx_gps, removed de gps and now its perfect! No lag at all, i dont see any “hitch warning” error and the server feels really good! One little thing that does so much.