DataStore sometime don't save

ik exist posts similar like this but they aren’t same

the warn i got is something like:

datastore: the request is added to queqe, if the queqe is full it will be deleted. datastore.Key = 548574453

why it appears, and is a way to repear this? or should i use UpdateAsync() to stop this?

Please do not paraphrase exceptions/warnings, instead post the actual content. By paraphrasing it, you’ve only made it harder to understand, and you’ve missed potentially useful information.

1 Like

this is the only warn/error i get if u want the script( i don’t think it can help u):


function DataModule:SaveValue(plr,key,name,ValueToSave)
	for Name, Key in pairs(DataAndValues) do
		warn(Name..' key is '..Key)
		if name == tostring(name) and Key == tostring(key) then
			DSS:GetDataStore(key):SetAsync(plr.UserId, ValueToSave)
			break
		end
	end
end

I don’t need the codes. But maybe it will be useful soon. What I want is the official warning, not a paraphrase of it. Also that tostring habit, pls

ive said arleady over 3 times this day: sometimes u can save the key or name with numbers so they need to be strings

What he means is for you to look in the output, copy that warning and then directly paste it here.

the ‘oficial’ warn: DataStore request was added to queqe. if request queqe fills , further requests will be dropped. Try sending fewer requests . Key =43567332

but it is only one save, one player and only one SetAsync()

note: when it don’t get that warn it works

Doesn’t look official, roblox wouldn’t make spelling mistake, but whatever

The issue is simply you’re writing to the same key too often. So send fewer requests.

1 Like

Maybe you are sending too much requests at the same time. That happened to me

no, i only send one request 30chars

So you only sometimes get the warn, correct?
It could be that your code is accidentally calling the function too many times.

Could you tell us how the function gets called?

Or better yet, just post the rest of the code that relates to the datastore.

this is how the script is called (ik if there is more players it will give the warn):


local AutoSave = coroutine.create(function()
	for _, Player in ipairs(game.Players:GetPlayers()) do
	   local Stats = Player:FindFirstChild('leaderstats')
		if Stats then
			warn('Saving '..Player.Name..' Values')
		   DataModule:SaveAllValues(Stats,Player)
		else
			Player:WaitForChild('leaderstats')
			warn('Saving '..Player.Name..' Values')
		   DataModule:SaveAllValues(Stats,Player)
		end
	end
end)

For now, make use of DataStoreService:GetRequestBudgetForRequestType

To get your request budget for Enum.DataStoreRequestType.SetAsync. Make sure it’s greater than 0.

1 Like

What’s the problem?

From your error it seems as if you’re sending too many SetAsync requests to the key 43567332. This is causing roblox to rate limit you and start to drop from even processing requests.

How do I check what my limit is?

It’s very simple, roblox has a rate limit that is stated in their wiki as [60 + numPlayers × 10] per minute.

Is there a solution?

Yes, a very easy solution is to create a Datastore module that cache’s the data so that you can SetAsync() and GetAsync() all you want without the worry of being rate limited.

There are some modules that do this and are open sourced.

The PlayerDataStore module isn’t really maintained anymore and @Maximum_ADHD started updating it but I can’t seem to find the link. If I do find it I’ll update this.

4 Likes