"network/raknet" and "network/replicator" memory issue

Hello!

I’ve been put in charge of fixing a serious issue with a game my friend owns, and there seem to be huge spikes in the network/raknet and network/replicator memory groups under CoreMemory over time. I’ve scoured the forums for a few posts relating to this issue, and although I’ve found several posts, none of them seem to really explain my issue.

I don’t have anything to go by, so I was wondering if there are people out there that can give a few hints at what might be a reason for this to increase. What kind of actions could cause problems in these memory groups? Also, the issue is server sided, the client is fine.

On top of that, UntrackedMemory seems to slowly increase as well, just not as dramatic.

Here’s some images to show the issue:

New server

Old server (about 10 hours later)

Feel free to ask me questions to figure out the problem, I’m dying to know.

1 Like

Why is this an issue in the first place? Is it causing major lag in the game?

One thing to reduce untracked memory may be to fix memory leaks inside scripts, like table entries that do not get deleted.

I wish I knew, things like table references are fine, deleting parts is fine, we’re also disconnecting all connections and events that aren’t being used. It seems to be something going on that isn’t immediately obvious.

It’s causing major issues, servers crash after only a day while lagging a lot for the last few hours before doing so.

That sounds like a very in-depth issue. I can’t help you here, but make sure that all the table references, events, and unused parts are destroyed throughout the game and double-check. Without knowing what the game is and how it works, I can’t help anymore than that.

This seems normal. Like you said, it’s probably a core thing. Seems like everything has been done to slow down and minimize untracked memory. I mean eventually the server will stop, and 10 hours sounds like a good lifespan for a server.

Unless if the game is edging near 1GB of memory, I don’t think it’s really an issue. And again, you’re probably right when you say it could be a core thing.

this maybe the cause of remote signals every time a remote is firing an event to the server it should take bits of space and when 1-20+ People do it, it will skyrocket and like @RawEggTheGreatIX said it’s 1GB only per server memory so if it uses alot of remote’s then I suggest decreasing it it may not be accurate though

1 Like

Ah yes, RakNet.

I don’t believe network/raknet or network/replicator will be a part of your issue. If you’re unaware of what RakNet is, it’s a networking middleware used in order to create a multiplayer environment in games. If it genuinely was a problem with either of these then I think there would be significant issues on a larger scale across almost every other game on the platform.

It sounds to me like you’ve got a memory leak somewhere within one of your scripts, it could potentially be happening within an event you use and haven’t disconnected. This could even be the cause for network/raknet and network/replicator increasing in memory size, as there might be an increasing amount of data needing to be communicated via the network.

My suggestion in order to try and locate the exact issue would be to remove/disable all scripts within the game and slowly add back/enable each one individually, carefully testing until you find the script that appears to be causing the server to experience lag/crash.

6 Likes