Server memory reaches 5 GB Why?

I have been searching and working on this for over 3 months but I can’t figure out why server memory is increasing and becomes 1k+ hours ago I checked biggest server was 5.6k but now its 4.8k in another server (biggest) I just need to know why its increasing and how can I reduce it?

Make sure you don’t have any unwanted script in your game. If you don’t, then seak for your scripts that might have a loop without a ‘wait()’ (while loops or repeat until). If that’s still not the case then seak for any heavy motion. By that I mean any hudge object unanchored, or a too big amount of parts moving at the same time. If still not the case, then try reducing your asset amount.

If you still can’t figure it out, I got a last possibility. It happened to me once. Search for any unwanted humanoids in your workspace. Go also in test mode an look in your workspace to make sure you don’t have a “humanoid generator”.

Hope you figure your issue out!

1 Like

There isn’t any humanoids in workspace I have double check that and all loops have wait() or either heartbeat/stepped:Wait()

Has your game any crazy amount of assets?

are you only using stepped for client things like camera manipulation? using stepped for anything else, or just a lot, can be very costly.

Also, if you have any parts that use a spinner script that you could use physics to spin, I would make them with hinges and angular velocities, as it seems spin scripts can use a crazy amount of resources

Our game has around 35k parts…

We don’t have any script that is related to camera

I heard its better than using wait() in other posts

It seems like there is a dropdown button for the Memory. Can you click it and look which is using the most memory?

In that case, use task.wait() as it yields the thread and resumes in the next Heartbeat step, meaning its duration is that of

RunService.Heartbeat:Wait()

without throttling.

Wait wait I am confused wdym? explain more you mean I switch heartbeat with task.wait() ?

They’re technically the same but task.wait() avoids throttling and an alternative to what you should use instead of wait(). You can find out more here.

What about heartbeat/stepped aren’t they good?

task.wait() is the improved and preferred version. Why should you use Heartbeat if you have a better version to it?

Are you sure you don’t have any backdoor in your game that can cause this massive lag?

I have searched before “require” and all scripts are safe