DataStore request was added to queue error is constantly being displayed

I’m attempting to stop all these errors from happening. Once they start, there is just a constant wall of them. I don’t know whats causing this since the only time player data is saves is when 1. something is collected (maybe about every 10 seconds max) 2. player changes a setting (i dont think people are doing that often) 3. a player leaves or joins. my scripts retry about every 5 seconds before retrying, before waiting 10, 20, then 40 etc. seconds. i dont know what causes this but its causing loading screens to stop which makes the player unable to play the game. Ive looked at the dev forum and based on that i should have a total of 60+ saves per server. i really dont know what could be causing this. im thinking it might be about a lot of new players joining (due to the fact that that could take about 5-10 data gets) but that would mean around 10 people would have to join in a minute (unrealistic for my game) and my game has had this issue below that number, when people werent even joining. am i misunderstanding how this error works? ive included a picture of the error codes in game for reference.

Try this:

  1. Auto save every minute(mine is every 5 minutes) with 6 seconds wait in between players
  2. Settings? if it’s just for visuals maybe save it only when the player leaves or if there is changes made
  3. For collecting stuff(coins, cash or whatever), store it somewhere else temporarily( add it to a numberValue or IntValue or in a table of values) then save it when the player leaves. also include to auto save

I’ve had this problem, it’s just I was saving data too frequently.

do you need to save something that often?
just keep the saves as joining and leaving.

if you need to save that often, add a cooldown buffer
meaning if a save already happened within the last 15 seconds for that player it waits until that timer is over then applies the save or until the player leaves.

I’ll try buffering saves and see if it helps. Also I’m already doing the thing said with settings mentioned in wyvns post so we’re good there. I’ll post a follow up after I’ve implemented the system to see if it worked.

It’s doing what it’s saying. You’re saving too much. Ideally, you load once on join, keep everything in memory in a shadow buffer, work with that data without recalling it, and save once when they exit or the server shuts down.

I buffered saving to every 6 seconds and optimized settings saves. that seems to have sufficiently reduced saves and i havent seen any errors in the 30+ minutes ive watched this game be played by people. thank you guys!