I have spent the last few months trying to narrow down the problem to a script in our game without much luck; we have rewritten about 50% of our codebase in search of this issue and to no result.
SCI - Pathos III - Roblox - The issue occurs here in our live game, where servers reach between 6GB before crashing, and occasionally get the cap increased to 12GB.
Servers should either not crash, or if there is a script-caused memory leak that memory leak should be attributed to a specific script label in the developer console.
13 minutes into game server start:
Our in-game graphing for server memory and nil instance count over time
Screenshot of Untracked Memory
PlayFab statistics for server lifetime, with Server Memory on the Y axis and time in the X. The key is each JobId.
The obvious pattern here is, according to some unknown factor (we have tested against player count, joins, deaths, respawns, vehicle spawns, streaming loads, weaponry, remote traffic and all seem to have no correlation to the rate of increase) the server memory sharply increases to some point, and then either stops for a while or continues up eventually hitting the ~6.25GB limit for Roblox servers before they crash.
Screenshot of our server memory
How I calculate Nil Instances
local function getNilInstances() return stats().InstanceCount - #game:GetDescendants() end
This gets the number of game descendant objects and compares it to the stats() instance count, to identify the number of non-existent children.
The memory is distributed, apparently randomly between Untracked (implying a memory leak somewhere on our end),
network/megaReplicationData (which I have been unable to find any information on),
Memory Profile of game:
memProfStorage44428.json (5.6 KB)
Our game has approximately 100,000 parts (fluctuates due to building needs) - this is obviously very large, however if this was to blame I’d expect the memory to stay at a constant level rather than constantly increasing.
Issue Area: Engine
Issue Type: Crashing
Impact: Very High
Date First Experienced: 2021-05-01 00:05:00 (+01:00)
Date Last Experienced: 2021-09-10 00:09:00 (+01:00)
A private message is associated with this bug report