DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 368846099

i have two donation board in my game free model and i have this [error]. its spamming the error every few seconds. please help me.

error(warn): DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 368846099

model: Boards - Roblox

MainModule: MainModule66 - Roblox

You’re sending too many requests too fast. Try to make a cooldown or something before sending requests or only save the data when player leaves.

1 Like

Please search on google. You’re doing datastore request frequently.
You can save data temporary to somewhere in variable, And when player left or some event, You can send datastore request.

1 Like

Don’t send so many calls to the datastore system, it’s better to add a cooldown of 20 seconds for leaderboard to update, and more seconds depending on size of leaderboard(200 items in leaderboard = recommended is 60 seconds(1min) otherwise leaderboard won’t work.

Also, read the documentary. Data Stores (roblox.com)

but i cant find the source of this error there is a lots of requests. help me

Can you send me the leaderboard model or leaderboard script? I might get a better answer.

i send it already look up in the MainModule

change settingshandler to this(your leaderboard will update every 40s)

local Blocked = {}
local Products = require(script.Parent:WaitForChild(“Products”))
local Custom = false

wait(1)

if Products.AbortCustomPurchases then
if Products.AbortCustomPurchases == true then
Custom = true
warn(“Donation Board: Changing the donation board datastore is disabled if AbortCustomPurchases is true!”)
end
end

local Retriever = script:WaitForChild(“Retriever”)
local Datastore = game:GetService(“DataStoreService”):GetDataStore(“BoardData”)
local Data = Datastore:GetAsync(“Data”)

if Data == nil then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
else
if (not Data.Version) then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
Datastore:SetAsync(“Data”,Data)
elseif (Data.Version ~= 2) then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
Datastore:SetAsync(“Data”,Data)
end
end

function getOwner()
if game.CreatorType == Enum.CreatorType.User then
return game.CreatorId,game.Players:GetNameFromUserIdAsync(game.CreatorId)
else
local owningGroupInfo = game:GetService(“GroupService”):GetGroupInfoAsync(game.CreatorId)
return owningGroupInfo.Owner.Id, owningGroupInfo.Owner.Name
end
end

function Retriever.OnServerInvoke(Player,Action,Data)
if Action == “Authenticate” then
local OwnerId,OwnerName = getOwner()
if Player.userId == OwnerId then
return true
else
return false
end
elseif Action == “GetData” then
local Data = Datastore:GetAsync(“Data”)
if Data == nil then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
end
return Data,Custom
elseif Action == “SetData” then
local OwnerId,OwnerName = getOwner()
if Player.userId == OwnerId then
Datastore:SetAsync(“Data”,Data)
end
end
end

local Owner = getOwner()
if Owner then
if Blocked[Owner] then
_G.DBLocked = true
else
_G.DBLocked = false
end
else
_G.DBLocked = false
end

1 Like

help, i just copy paste

local Blocked = {}
local Products = require(script.Parent:WaitForChild(“Products”))
local Custom = false

wait(1)

if Products.AbortCustomPurchases then
if Products.AbortCustomPurchases == true then
Custom = true
warn(“Donation Board: Changing the donation board datastore is disabled if AbortCustomPurchases is true!”)
end
end

local Retriever = script:WaitForChild(“Retriever”)
local Datastore = game:GetService(“DataStoreService”):GetDataStore(“BoardData”)
local Data = Datastore:GetAsync(“Data”)

if Data == nil then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
else
if (not Data.Version) then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
Datastore:SetAsync(“Data”,Data)
elseif (Data.Version ~= 2) then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
Datastore:SetAsync(“Data”,Data)
end
end

function getOwner()
if game.CreatorType == Enum.CreatorType.User then
return game.CreatorId,game.Players:GetNameFromUserIdAsync(game.CreatorId)
else
local owningGroupInfo = game:GetService(“GroupService”):GetGroupInfoAsync(game.CreatorId)
return owningGroupInfo.Owner.Id, owningGroupInfo.Owner.Name
end
end

function Retriever.OnServerInvoke(Player,Action,Data)
if Action == “Authenticate” then
local OwnerId,OwnerName = getOwner()
if Player.userId == OwnerId then
return true
else
return false
end
elseif Action == “GetData” then
local Data = Datastore:GetAsync(“Data”)
if Data == nil then
Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
end
return Data,Custom
elseif Action == “SetData” then
local OwnerId,OwnerName = getOwner()
if Player.userId == OwnerId then
Datastore:SetAsync(“Data”,Data)
end
end
end

local Owner = getOwner()
if Owner then
if Blocked[Owner] then
_G.DBLocked = true
else
_G.DBLocked = false
end
else
_G.DBLocked = false
end

(for me)

lol its still same i cant copy paste

its still not working bro please help me

Sorry, try again. forgot to use backticks.

local Blocked = {}
local Products = require(script.Parent:WaitForChild("Products"))
local Custom = false

wait(1)

if Products.AbortCustomPurchases then
	if Products.AbortCustomPurchases == true then
		Custom = true
		warn("Donation Board: Changing the donation board datastore is disabled if AbortCustomPurchases is true!")
	end
end

local Retriever = script:WaitForChild("Retriever")
local Datastore = game:GetService("DataStoreService"):GetDataStore("BoardData")
local Data = Datastore:GetAsync("Data")

if Data == nil then
	Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
else
	if (not Data.Version) then
		Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
		Datastore:SetAsync("Data",Data)
	elseif (Data.Version ~= 2) then
		Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
		Datastore:SetAsync("Data",Data)		
	end
end

function getOwner()
    if game.CreatorType == Enum.CreatorType.User then
        return game.CreatorId,game.Players:GetNameFromUserIdAsync(game.CreatorId)
    else
        local owningGroupInfo = game:GetService("GroupService"):GetGroupInfoAsync(game.CreatorId)
        return owningGroupInfo.Owner.Id, owningGroupInfo.Owner.Name
    end
end

function Retriever.OnServerInvoke(Player,Action,Data)
	if Action == "Authenticate" then
		local OwnerId,OwnerName = getOwner()
		if Player.userId == OwnerId then
			return true
		else 
			return false
		end
	elseif Action == "GetData" then
		local Data = Datastore:GetAsync("Data")
		if Data == nil then
			Data = {ListSize = 15, Datastore = 1, Refresh = 40, Version = 2}
		end
		return Data,Custom
	elseif Action == "SetData" then
		local OwnerId,OwnerName = getOwner()
		if Player.userId == OwnerId then		
			Datastore:SetAsync("Data",Data)
		end
	end
end

local Owner = getOwner()
if Owner then 
	if Blocked[Owner] then
		_G.DBLocked = true
	else
		_G.DBLocked = false
	end
else
	_G.DBLocked = false
end

oof dude its not working i tried everything please helpp