Question on the impact of queued DataStore requests

Hi, the post to start with will be rather vague, however I will attach relevant bits of code to help assist in diagnosing the issue. After doing local testing, I get the following error:

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

My question is how much of an issue is this warning, and what can I do to fix/reduce its impact?
The current things I have involved in the ‘datastore’ are:

  • skins for 3 different teams
  • accessories for 3 different teams
  • hairstyles
  • gold system
    Affected by:
    -Collectable coins in game map
    -Winning rounds
  • Buying ingame gp

Thanks

1 Like

You are sending too many requests. Don’t use 6 different datastores per user btw lol

It isn’t an issue at all depending on how you’re handling your datastore.

Are you using multiple datastores, one for each item or is it just a single datastore?

If the former, you should migrate to a single datastore, otherwise you’ll be fine as long as you aren’t filling up the queue with multiple unnecessary datastores.

I get the warning when I’m sending a single datastore request so yeah, you’ll be fine as long as it’s a single/very few datastores (like 3 per player at the most).

This article may be useful for you:

This is a reply to both, I do believe I only use a single datastore as I define one only once like this

local DataStore = DataStoreService:GetDataStore("MyDataStore3")

To which the gold, skins and accessories all adhere to. Would this seem fine to you?

Edit: Yeah ive had a look through it I just didnt seem to get a lot from it for the issue.

1 Like

Yeah, as long as you’re using one datastore per player, you will be fine. That warning pops up as it’s trying to write to the queue two or more times quite quickly if that makes sense. You could probably add a boolvalue to the player and then check if the value is true when saving.

1 Like

I have noticed in the console there is a ‘DataStores’ section with the values of GetAsync, UpdateAsync etc. Would telling you the value range I get for these indicate anything at all? Or are they uninformative?

Probably would tell you what the requests are, you could try and reduce them. Not sure if it’s a big deal though.

I would advise using a table to store a player’s data. You could use a module to maintain this connection and update the data only when the player leaves the game and when there are shutdowns or the server crashes, even saving data every 5 minutes or so.

Interesting, if I were to keep it as is though do you think it would cause any gamebreaking issues?

Probably would lead to data loss as the queue would fill up quickly.

I thought it would be fine if i was to use only one datastore? (baring in mind my game is 6 max players)

It’s fine if you’re writing to the datastore with a single key.

If you have a single table that contains everything, then you’re good to go. Otherwise, I’d look into migrating players’ data to a new model that uses a single DS.

Sorry to reopen this guys. But my games been open a day and a bit, and one of my players came in today and said their gold value had been reset to the default value (500) but he is the only one. He said that he last left when he was loading into the game round map (this is when the game ping spikes) not sure if thats related but thats what he told me. Should this be happening if im only using 1 datastore?

You could try changing them to tables like this, so there is like only one request,

I made a topic about it, if you need reference,

1 Like

Thanks , il check it out soon and let you know!

Ps, are the GetAsync and UpdateAsync values indicative of anything (in the DataStore section when in console)?

I would guess so, but I am not exactly sure what.