Server lagg, need your help

Hello guys i’m using windows server 2019 as a host with 6gb of ram and 2.3 GHZ cpu , i always have hitch warning (even when the usage of the cpu is less then 20%) , and when my server reaches 13/14 players it gets so laggy everything happens after a while … its so weird that with only 14 players the server uses around 2.2GHZ , i didn’t know what’s the problem until i saw a problem always appears in the console when it starts lagguing and here is the screeshot,
i updated esx status and my ServerFX the the latest versions and it still happens,
i don’t know this bugg is making the server low or not , please help me my players are getting annoyed and i worked hard for the server…
an other thing, an other problem happens everytime a player joins as u can see… i need help fast please if anyone can fix this for me i can give him my host to do that for me , and i will be so grateful

''i removed the load of the resources so the code won't be so long ''

Started resource Loading-Screen
Started resource RPDeath
Argument count mismatch (passed 1, wanted 2)
Authenticating server license key...
Server license key authentication succeeded. Welcome!
cfx> Sending heartbeat to live-internal.fivem.net:30110
Performing version check against: https://api.kanersps.pw/em/version?version=6.2.2&uuid=e033325e-ecc1-49d3-7f46-0d756a980056

Loaded MySqlConnector, Version=0.26.0.0, Culture=neutral, PublicKeyToken=null into ScriptDomain_1188398672
hitch warning: frame time of 1923 milliseconds
Loaded System.Threading.Tasks.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 into ScriptDomain_1188398672
Loaded System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 into ScriptDomain_1188398672

[EssentialMode] Current version: 6.2.2
[EssentialMode] Updater version: 6.2.2

Access denied for command sets.
Access denied for command sets.
[EssentialMode] Everything is nice and updated!

^1Advertisement: ^7Want to have EssentialMode pre-installed on a good and affordable server host? Go to the following link: https://zap-hosting.com/EssentialMode
hitch warning: frame time of 1145 milliseconds
Connecting: DyNex.Kesa7 Γÿú Γÿ¡
Sending heartbeat to live-internal.fivem.net:30110
Access denied for command add_principal.
Successfully Loaded Identity For Choukou Kesa7
Error running system event handling function for resource esx_status: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/main.lua:29: attempt to index a nil value (local 'xPlayer')
stack traceback:
        server/main.lua:29: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138>
Sending heartbeat to live-internal.fivem.net:30110
[SAVED] DyNex.Kesa7 Γÿú Γÿ¡
Sending heartbeat to live-internal.fivem.net:30110
Sending heartbeat to live-internal.fivem.net:30110
[SAVED] All players
Sending heartbeat to live-internal.fivem.net:30110
Sending heartbeat to live-internal.fivem.net:30110
Sending heartbeat to live-internal.fivem.net:30110
[SAVED] All players
Sending heartbeat to live-internal.fivem.net:30110
Sending heartbeat to live-internal.fivem.net:30110
Sending heartbeat to live-internal.fivem.net:30110
[SAVED] All players
Sending heartbeat to live-internal.fivem.net:30110
Sending heartbeat to live-internal.fivem.net:30110
Sending heartbeat to live-internal.fivem.net:30110
Connecting: L7aj Ka7la
Sending heartbeat to live-internal.fivem.net:30110
Connecting: Lakhel csgo500
Sending heartbeat to live-internal.fivem.net:30110
hitch warning: frame time of 166 milliseconds
hitch warning: frame time of 225 milliseconds
hitch warning: frame time of 238 milliseconds
hitch warning: frame time of 650 milliseconds
hitch warning: frame time of 164 milliseconds
hitch warning: frame time of 464 milliseconds
hitch warning: frame time of 164 milliseconds
hitch warning: frame time of 167 milliseconds
hitch warning: frame time of 270 milliseconds
Access denied for command add_principal.
Successfully Loaded Identity For liwe
Error running system event handling function for resource esx_status: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/main.lua:29: attempt to index a nil value (local 'xPlayer')
stack traceback:
        server/main.lua:29: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138>
Sending heartbeat to live-internal.fivem.net:30110
phone qtty: 2
[SAVED] L7aj Ka7la
[SAVED] All players
Sending heartbeat to live-internal.fivem.net:30110
Connecting: Diego Da Santa
Sending heartbeat to live-internal.fivem.net:30110
hitch warning: frame time of 160 milliseconds
Access denied for command add_principal.
Successfully Loaded Identity For Diego Da Santa
Error running system event handling function for resource esx_status: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/main.lua:29: attempt to index a nil value (local 'xPlayer')
stack traceback:
        server/main.lua:29: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138>
Received a vouch for Diego Da Santa, they have 2 vouches and need 2.
Diego Da Santa is the new arbitrator, with an overwhelming 2 vote/s.
Sending heartbeat to live-internal.fivem.net:30110
Connecting: mourad slima
Sending heartbeat to live-internal.fivem.net:30110
[SAVED] L7aj Ka7la
[SAVED] Diego Da Santa
[SAVED] All players
Available?: true
Available?: true
Available?: true
Available?: true
Available?: true
Available?: true
Access denied for command add_principal.
Successfully Loaded Identity For mourad slima
Error running system event handling function for resource esx_status: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/main.lua:29: attempt to index a nil value (local 'xPlayer')
stack traceback:
        server/main.lua:29: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138>
Sending heartbeat to live-internal.fivem.net:30110
Sending heartbeat to live-internal.fivem.net:30110
hitch warning: frame time of 361 milliseconds
Connecting: DaZai
hitch warning: frame time of 239 milliseconds
hitch warning: frame time of 403 milliseconds
phone qtty: 2
Sending heartbeat to live-internal.fivem.net:30110
phone qtty: 2
Connecting: Bibots CSGO500
Sending heartbeat to live-internal.fivem.net:30110
Connecting: Lakhel csgo500
hitch warning: frame time of 220 milliseconds
hitch warning: frame time of 396 milliseconds
Sending heartbeat to live-internal.fivem.net:30110
[SAVED] Diego Da Santa
[SAVED] L7aj Ka7la
[SAVED] mourad slima
[SAVED] All players
Performing version check against: https://api.kanersps.pw/em/version?version=6.2.2&uuid=e033325e-ecc1-49d3-7f46-0d756a980056

[EssentialMode] Everything is nice and updated!

^1Advertisement: ^7Want to have EssentialMode pre-installed on a good and affordable server host? Go to the following link: https://zap-hosting.com/EssentialMode
Access denied for command add_principal.
Successfully Loaded Identity For Da Zai
Error running system event handling function for resource esx_status: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/main.lua:29: attempt to index a nil value (local 'xPlayer')
stack traceback:
        server/main.lua:29: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138>
Received a vouch for DaZai, they have 2 vouches and need 4.
Access denied for command add_principal.
Successfully Loaded Identity For Bouraoui El Borni
Error running system event handling function for resource esx_status: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/main.lua:29: attempt to index a nil value (local 'xPlayer')
stack traceback:
        server/main.lua:29: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138>
Access denied for command add_principal.
Error running system event handling function for resource esx_status: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/main.lua:29: attempt to index a nil value (local 'xPlayer')
stack traceback:
        server/main.lua:29: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138>
hitch warning: frame time of 163 milliseconds
Received a vouch for Bibots CSGO500, they have 2 vouches and need 4.
Successfully Set Identity For steam:11000010cb836ee
Connecting: THIFA EL TAHFOUN
hitch warning: frame time of 165 milliseconds
hitch warning: frame time of 462 milliseconds
Sending heartbeat to live-internal.fivem.net:30110
[SAVED] DaZai
phone qtty: 0
phone qtty: 0
phone qtty: 0
hitch warning: frame time of 221 milliseconds
hitch warning: frame time of 406 milliseconds
hitch warning: frame time of 152 milliseconds
Connecting: DaZai
hitch warning: frame time of 186 milliseconds
hitch warning: frame time of 551 milliseconds
Sending heartbeat to live-internal.fivem.net:30110

You have a lot of errors there, its normally to make lag…

Fix them and done .

1 Like

the problem that i’m noob with coding i’m just putting scripts and changing some coords , if u please can help me to solve this error i will be so greatful

1 Like

right so first, things first try to optimize your resources, lower them down into a little folders and resources as you can, then slowly try to fix the errors and dont put shit in you dont need.

1 Like