How players can fill your game's memory store quota
A remote that adds long-lived memory store entries under new keys can stop every memory store write in the game. How to key, expire and cap them.
What it looks like
A remote adds an entry to a memory store each time it's fired: a cross-server listing, a "looking for group" post, a bounty, a shout-out, a party advert. Each call writes under a new key or adds to a queue, the entry lives for days, and nothing limits how many entries one player can have at once.
remote.OnServerEvent:Connect(function(player, item) board:SetAsync(HttpService:GenerateGUID(false), { item = item, userId = player.UserId }, 45 * 24 * 60 * 60) end)
What an exploiter could do
Once the game reaches its memory quota, every memory store write that adds memory fails, in every server, until entries expire or are removed. Roblox's best practices warn that a long expiration on lots of data can break the entire game. One exploiter firing the remote on a cooldown can fill it, and everything else built on memory stores stops: matchmaking queues, cross-server markets, party lists, server browsers and locks. With 45-day entries, the outage can outlast the exploiter by weeks.
How to fix it
- Key entries by the player's
UserIdso each player has at most one, or keep a per-player count and refuse new entries over a small cap. - Give entries the shortest expiration that works, in minutes or hours rather than days, and remove them when they're used or the player leaves.
- Cap the size of anything the client sends before it's stored, and store ids from server tables rather than client text where you can.
- Treat a failed write as normal: wrap it in
pcalland tell the player the board is busy.
Vulnerable example
local HttpService = game:GetService("HttpService") local MemoryStoreService = game:GetService("MemoryStoreService") local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local adverts = MemoryStoreService:GetSortedMap("PartyAdverts") local cooldown = 10 local keepFor = 30 * 24 * 60 * 60 local modes = { Raid = true, Arena = true, Dungeon = true } local lastPost: { [Player]: number } = {} ReplicatedStorage.Remotes.PostPartyAdvert.OnServerEvent:Connect(function(player: Player, mode: unknown) if typeof(mode) ~= "string" or not modes[mode] then return end local now = os.clock() if now - (lastPost[player] or -math.huge) < cooldown then return end lastPost[player] = now local advert = { userId = player.UserId, mode = mode, jobId = game.JobId } pcall(adverts.SetAsync, adverts, HttpService:GenerateGUID(false), advert, keepFor, os.time()) end) Players.PlayerRemoving:Connect(function(player) lastPost[player] = nil end)
Fixed example
local MemoryStoreService = game:GetService("MemoryStoreService") local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local adverts = MemoryStoreService:GetSortedMap("PartyAdverts") local cooldown = 10 local keepFor = 10 * 60 local modes = { Raid = true, Arena = true, Dungeon = true } local lastPost: { [Player]: number } = {} ReplicatedStorage.Remotes.PostPartyAdvert.OnServerEvent:Connect(function(player: Player, mode: unknown) if typeof(mode) ~= "string" or not modes[mode] then return end local now = os.clock() if now - (lastPost[player] or -math.huge) < cooldown then return end lastPost[player] = now local advert = { userId = player.UserId, mode = mode, jobId = game.JobId } pcall(adverts.SetAsync, adverts, tostring(player.UserId), advert, keepFor, os.time()) end) Players.PlayerRemoving:Connect(function(player) lastPost[player] = nil pcall(adverts.RemoveAsync, adverts, tostring(player.UserId)) end)
How to spot this in your own scripts, and the cases that only look like it, are part of the Luaudit check your AI runs.