I have a severe memory leak in a game I'm working on and I can't find the culprit

Hello, after a new roblox update on the server manager I came to discover that I’ve had the realization that several servers have crashed due to severe memory usage, I’ve made a few tweaks like using :Disonnect() on some events but I don’t think that’s enough, I’ve had a look in the developer console and noticed that there’s a lot of memory used by Instances.
I will attach a few screenshots.

This is the current server that I’m in.

image
image


image
Does anyone know what remedees I can use to significantly lower the memory usage for my server so there will be fewer crashes.
A bit of context the game is a Difficulty Chart Obby, Server size is 16 Players and average framerate is 60.

Broader view of servers.


Are lots of parts falling out the workspace per chance? Objects that falls out of the world are not destroyed, but instead removed, which mean the connections dont get disconnected.

You should also make sure any references you manually made in code are removed, because Destroy wont do that.

2 Likes

I have never actually checked, because from what I know we have no un-achored parts in the game but I might be wrong, we only have gears which players can just throw out but I don’t think that there can be so many that it causes issues, I’ll have a look and see what I can find.
Thanks for the suggestion!

1 Like