Hello
When I run a script in Studio, which loops on multiple keys in a datastore (reading or deleting them), I often get throttling errors.
Where can I see what are the limits for read / write “per Datastore”?
Thank you
Hello
When I run a script in Studio, which loops on multiple keys in a datastore (reading or deleting them), I often get throttling errors.
Where can I see what are the limits for read / write “per Datastore”?
Thank you
this should answer all your questions.
I do not see limits “Per Datastore”
Is it the “Server limit”, which is used in my case?
[GetAsync()] 60 + numPlayers × 10
I am running the script in Studio, so I am not sure what is considered the numPlayers in my case?
Also if I run
local budget = DataStoreService:GetRequestBudgetForRequestType(Enum.DataStoreRequestType.GetAsync)
I get 1708, so I am not sure how this number relates to the formula above?
If you want to know how many you can read and write to a single key then you will have to look at the Throughput limits.
If you’re talking about GetAsync()
you can use it 60 + numPlayers × 10
timer per minute.
for example if you have 2 players in your game that would be 60 + 2 × 10
or 80 requests per minute. This limit counts for every GetAsync you use in that server.
I am not interested in limits per key.
I loop on multiple keys in a datastore but do GetAsync only once per each key.
I am doing this in Studio, not in a live game. This is not a live server, on which I can see the number of players.
According to the formula above the limit must be 70 in this case? However it is not.
yea it should be 70.
can you share the code?
specifically the loop and the part where you use GetAsync()
.
The code is quite complex, with few modules
but I am trying to understand the limit (in Studio)
by running this
local DataStoreService = game:GetService("DataStoreService")
local budget = DataStoreService:GetRequestBudgetForRequestType(Enum.DataStoreRequestType.GetAsync)
which returns 3584 at the moment
i did some further research and it looks like the limit is not always strictly 70. it accumulates over time when you’re not using any requests.
So if you wait some time and your budget is now at 250 you should be able to do
for i = 1, 250 do
datastore:GetAsync("key")
end
however now you have used all your budget for this minute and any other request will fail.
For me in the actual game with 1 player the budget seems to stop at 300 however in studio there doesn’t seem to be a limit that’s probably the reason it’s at 3584 for you.
i have not thoroughly tested what i’ve just said here so take it with a grain of salt.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.