Hello all,
Recently, my game’s servers have been crashing due to the server hitting the 6.25 GB limit in server memory. I was concerned there may have been a possible memory leak with this, so I decided to test things into my own hands. When viewing active servers’ memory, I realized that (as usual) server memory increases when players spawn cars. I wasn’t exactly concerned with this itself, but what does concern me is the fact that the server memory does not go down when the car is destroyed. This seems like a ROBLOX internal issue, but if it isn’t (and it’s a me issue), I’d love to hear any feedback.
And yes, I understand the server memory is pretty large even on server startup, but one of the goals for the game is make an immersive, realistic map, so unfortunately there isn’t any way around it (if you have tips let me know though!)
Here is a Google Sheet of my findings:
“Normal” column is when the server is first started up, and the rest of the columns are self-explanatory.
Here is a video demonstration of this issue:
As you can see, I spawn in 128 cars and destroy them. One can expect the memory to decrease back to normal when they are destroyed, but that is not the case.
I understand that spawning 128 cars all at once may not be the best test (considering the servers are max at 30 players), but it does simulate what can happen over time during a server’s lifespan.
Let me know if you have any thoughts on this and any workarounds in the mean time.
EDIT:
Here is a place file where you can test this for yourself!
MemLeak.rbxl (5.7 MB)