DataStore SetAsync Error 502 and 500

Hi, recently, my game has been having data-loss issues. It is a recurring problem, and I’m unsure of the cause. I use a system with an ordered data store and a normal data store, to keep backups.
image
This doesn’t occur on load, only while it saves.

1 Like

This issue isn’t your fault, nor is it something you can fix. This is a problem of Roblox, and isn’t something you can fix.

The problem is that this is causing multiple users per day to lose up to 30 minutes of data. I’m saving every 240s (4 mins).

1 Like

Again, this isn’t something you can fix even if you wanted to. You will have to wait on Roblox to fix the problem.

It only appears to be happening in my game. It started after we hit a decent playercount, and it is honestly quite ridiculous that we can’t rely on Roblox for consistent data storage, especially when it’s such a major feature.

For this, I would just recommend wrapping it in a pcall() and repeating every second, or however long, until the function returns successful.

You could possibly look forward into Datastore2

This isn’t an implementation issue, it’s an internal server error caused by Roblox (as shown by the error). Datastore2 cannot fix anything here.

And I literally just linked this in another thread:

If you’re doing datastores properly, you don’t need to use somebody else’s module. Using somebody else’s module also makes things much more complicated when it comes down to debugging.

1 Like

Status+

:skull:

I would just recommend wrapping it in a pcall() and repeating every second, or however long, until the function returns successful.

Tried that, now I’m getting queue full errors. Great.

You could possibly look forward into Datastore2

I am using essentially the same system as DS2, and that wouldn’t fix the issue

Are you saving too often? Are you trying to save too much data at once?

Checked data size on a particularly large save, that isn’t the problem, and it wouldn’t cause error 500. I’m autosaving every 240 seconds, and when the player leaves (1 normal datastore save, 1 ordereddatastore save). This should be well below the limits.

Are there any other details you might be able to give? What kind of data are you saving? Are you encoding it into JSON right before? Has this always been happening or only recently?

try waiting every 6 seconds rather than every second, seems odd that you would be getting increased write errors

i disagree personally – the more popular ones were made with debugging in mind and provide automatic error handling/retries. nothing wrong with using open sourced datastore modules

i do however agree that that suggestion would not be of much use in this case

I’m no longer getting 502 and 500, although I’m getting queue full. I’m saving twice (1 ordered, 1 normal) every 240 seconds. There are 3 leaderboards which save up to 7 ordered keys every 600 seconds, which still shouldn’t be hitting the limits, nevermind filling the queue.

If you are still having this issue, have you tried printing everytime datastores are used to make sure there isn’t a timing issue?