"network/megaReplicationData" and "network/replicator" taking up huge amounts of memory

Hello,

My server memory is going up (and beyond) safe acceptable limits - clearly there is a memory leak, but it is incredibly difficult to diagnose the location when I don’t understand what these memory labels are.


The memory does not go down at all for these values, only up - how exactly is this the case? Surely the memory taken up by a network replication event would go up and down based on network traffic (?). I’m incredibly confused by this; I’ve seen other articles here that attempted to address this but none to my satisfaction. Any ideas?

Thanks!

There could be a lot of reasons behind this. Maybe you have connections that aren’t being disconnected. You might have a RunService that never ends while multiplying itself. 90% of the time connections take care of themselves, but to make sure they do you could try attaching an event to an object for example and destroying it later. You could also just cache the connections/events in a variable or table and disconnect them later.

I’m confused as to where the network/replicator part causes the memory leak - the memory leak isn’t in scripts, or events - it’s entirely in the network replication.

Just to make sure this is in an actual server right?

Thats because in studio memory usage basically gets 3x because the server is loaded on the pc including scripts etc

Yep - This is in a live game (and happens every server). Player count ranges from 50-150.

Are you inserting more instances overtime in replicated areas (workspace, startergui, replicatedstorage, replicatedfirst, lighting) without destroying them as necessary, how much is in these replicated areas, what exactly is in there?

I’m not - the game doesn’t really insert massive numbers of new parts, and when it does they’re usually into character models.

I will be trying to figure out if the instance count goes up over time, though. That’s a good idea!

1 Like

Definitely check instance count. I had this issue until I realized there were tens of thousands of attachments parented to Workspace.Terrain that I forgot to destroy.

Sure - I’ve had a search around in my game for any such insatances, and nothing at the moment. We’ve gradually reduced the number of parts by over 100,000 parts. This had no impact at all, unfortunately.

I’m beginning to suspect this is some obscure Roblox issue. Anyone else having this specific issue?

2 Likes