FiveM Role Play Server Memory Usage

so as the topic says i am having a problem with my server

as you can see the memory usage gets pretty high a couple of hours after i restart the server it slowly builds up and when it hits about 15% the server starts lagging the more it builds up the worse the lag is

the server uses ESX and it is a roleplay server that gets around 70 players everyday i was hoping someone here knows a way to perhaps manage the memory usage more effciently and also check which resources use more memory so that i can actually work on them and make them more efficent to the server

thanks for your help.

if you have oversized assets that can cause lag issues, poorly made scripts can, but mainly oversized assets are the main cause for memory build up. if you have any you should optimize the assets to cause less lag, what stats do you use on your vps if youre using a vps

Buy 128 GB RAM and it will work!

2 Likes

Although it might help I think the main focus should be on the oversized resources/assests

I think we should make things more clear i don’t actually own the server I was hired to fix the lags now so I don’t know all the scripts just yet my main focus has been simply getting rid of all the unnecessary ones , but it doesn’t seem like the ultimate solution I think they are using a VPS they can host their very own servers and they have about 4 of them question is what should I look for in order to fix it, server side scripts, client side scripts, maybe even stream files also they have that iron shield anti cheat maybe it’s got something to do with it aswell any ideas?,
Have a lovely day

if the files are optimized then it wont cause lag

that’s the problem i doubt they are, so far i managed to optimize some of them but is there a way to find out which ones aren’t optimized ( cause lag , fps drops )

they say which files are too big and taking up virtual memory, so if you have access to the servers console then you can check them

go in game, go into the f8 console and type in “resmon 1” This will show you cpu time, and ram usage
type in resmon 0 to disable it

access denied for this command, any solutions?

also its worth mentioning that whenever the server gets stuck
this appears on the web console: server thread hitch warning: timer interval of 158 milliseconds ( example )

you wouldve needed permission to use a command that you have used, contact someone who has access to the server.cfg or permissions so they can add you into the permission to use said command

the problem has been semi-solved it was mostly un-effiicent scripts and overloaded sql servers

1 Like

Enable canary mode for fivem

i have it enabled for a while now, but canary mode mostly helps solve client-sided stuff not server sided

You can also do it in your server console

you mean the resmon cmd or canary ?