I have been work on trying to figure out what is causing issues in my server. The server runs smooth as butter on start up. After a while of people joining and leaving the server slows down. We have held 30 players before but the server starts to hitch pretty bad.
I’m running OVH Cloud
8x 2.8GHZ Virtual Cores
16gb Memory
150GB SSD
LATEST ESX V1.2FINAL
MYSQL 5.6 SERVER
LATEST RECOMMENDED ARTIFACT 3404
I’m also running it as 64 slot with onesync. I’m beginning to think onesync isn’t possible with es_extended, but I haven’t tried hosting the server to my community without onesync. I Havn’t reached out to the community here in about a year, because I have been able to solve most of my problems myself… but this one I’m just not understanding…
I can provide some information on what i’m experiencing.
Server.Lua
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
-- Do Stuff
end
end
This is the function that lags the server whenever we have 10+ people in the city, and it gets worse with more people in the server.
Here is an example of me running a profiler…
And here is another example, They are using the same ES_Extended Function
And this one Below here is the code for it.
Here is the ex_extended ref call it’s using.
ESX.GetPlayerFromId = function(source)
return ESX.Players[tonumber(source)]
end
Also been having the server crash, after a while there is a chance the server just gets really slow and crashes with a SIGSEV Error.
If there is any other information anyone needs I’ll be happy to provide, I’m struggling to fix this one major issue. Thank you!
Also… Over time, es_extended grows to rather large server side memory… gets over 1.0gb, is this normal?
More Info… Also esx_status will do multiple updates in resource thread?? Is this normal?
I’m also using esx_kashacters, if that makes a difference.
Example of what im going through
After 7 1/2 hours of uptime with a player count of 16 and the highest player id is 105 (total of 105 reconnects)
es_extended is over a gig, and the server is just lagging.