Datastore request was added to queue warning?

https://gyazo.com/2f597d09b069ab98b4dce86ff1d53aea

I’m not sure what it means as I can’t find it here https://www.robloxdev.com/articles/Datastore-Errors

https://gyazo.com/413a55e3861aab47d4e44372bfc46a7d

Not sure how it’s happening as you can see the budget is above 100+ at least

It’s happening in this game

It really concerns me because it’s terrible if the players loose data.

1 Like

It means you’re using data store methods too quickly. There’s a 5 second delay between Sets on the same key, which is what I believe this is referring to.

3 Likes

it doesn’t output that warning every time data is saved, and it’s saved quite often like every 60 secs

but it happens every 10 minutes or so

You don’t need to save every 60 seconds. Only save when the player leaves and (maybe) if they buy something (E.g. 100 points).

2 Likes

Global Leaderbroad

https://gyazo.com/e7dc96dcd0b040e8fc187742575993a5

Still. If this is an issue, only update the leaderboard every 90 seconds or something. I had a similar issue with my leaderboards and increasing the wait time helped.

4 Likes

okay, so players aren’t loosing any data so that’s good but there’s a flaw in the saving code

doing for i,v in pairs(Players) then SetAsync 6 times , by the time you get to the last player it’s a huge delay so an easy fix is to use spawn()


Thanks @Kampfkarren as we discussed this stuff privately

@Intended_Pun , I’ll do that, and I’ll mark your post as solve unless it still happens but it shouldn’t .

What if the server crashes?

No. No. No. You should ALWAYS save periodically. There are so many cases (server crashes, scheduled maintenance, datastore failure) which can cause data to be lost. You will only ever run into throttling if you index the same key several times in succession.

12 Likes

I also suggested saving when they bought stuff. Obviously it would be detrimental if you only saved when players left.

1 Like

I mean, if you save at the proper times this kind of becomes redundant, doesn’t it? Why save over something if it’s going to be the same anyway?

Periodic saving is a really basic way of handling those cases anyway. What if the server crashes before your periodic save? If you’re saving every 60 seconds that would probably mean you wouldn’t lose most if any of your data, but that still seems like a little overkill to me. I don’t see the issue with not doing that so long as you’re saving the data when it needs to be saved.

You’re putting hours of a player’s progress at risk by not saving because you’re pushing it as a single set request, which, happens to be at the worst time to do so. Server crashes? Whoops, everyone lost their progress because PlayerRemoving doesn’t fire. Roblox goes down for maintenance? Whoops, everyone lost their data because datastore requests get rejected during downtime. Forced shutdown? Whoops, half the server lost their progress because datastore requests got throttled.

3 Likes

I think their idea is to only save it when a change occurs in the data. The idea being if it doesn’t change there’s no need to save it at set intervals. That way you shouldn’t lose more than the particular action that’s busy/just completed if the game shuts down unexpectedly.

2 Likes

Yeah. I’m not saying to just save it when players leave.

???

1 Like

Hey guys! I think you are all right but in this case if you played my game I am pretty sure Data will change every Minute so yeah it’s good to save often, I don’t however save when the player buy things but I probably can because I can check the budget.

So all in all it depends on your type of game if it’s a Roleplay game data wouldn’t probably change much in a short time compare to a Simulator style game.

4 Likes