[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.

1 Like

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.

I have the same issue and still when i start the server i get hitchwarning and i am with ovh

In my case, this problem has appeared literally over the night. I have no idea where it came from… I am trying to optimize scripts whenever I feel I can and it was working fine just till last night. I woke up, looked at the server console and it’s full of lag spikes. 0 players atm.

…any suggestions? I’ve tried to disable few of the latest scripts that have been added, but no luck. Still a lot of spikes there.

1 Like

Did you update the server recently? which server artifacts version are you using?

Yes, I’ve updated es_extended, esx_vehicleshop and esx_drp_garage yesterday. Both were working fine for the rest of the day (with like 4-5 players on the server).

Ehm, hard to tell. Where I could find that? I’ve created the server from ground up somewhere early 2018 I think.

1 Like

i was actually talking about the server version, not the resources.

when your server is online. go to <serverip>:<port>/info.json inside a browser, you’ll find the version there.

All the way down is says “version”:2048026394

(found by ctrl+F only “version” key word in a bunch of informations there - hope this is what you’ve asked for)

Hello, sorry for my language of French baguette I find a little solution for the hitch warning do you have the same manifest version?
if this is not the case check which version manifest that five m uses then copy the manifest version in all your esx script. the manifest version can be found in resource.lua
Here I am, I had a big slowdown and since then I find that the waiter does not freeze more and more time out since remains to see that we will open the doors of the city

2 Likes

It’s working i think ! Thx man. Best support ever >.<

did you manage to fix it? how?

This may help everyone who gets the same problem…

Use the profiler tool the catch the problem and analyze what resources are creating lag on your server.