DEQUEUE request in datastore

  1. What do you want to achieve?
    I want the requests in the queue to be sent.
    I also would like to get rid of the warning of “DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests”

  2. What is the issue?
    Is that the warning appears, but my request is never dequeued, and never sent to the server.

  3. What solutions have you tried so far?
    I am putting my save requests to my own queue, named statsQueue which is a table ofc, the script checks the statsQueue and send 1 request in every 6 second.

I have some other requests though, which rarely happens, like my Debug, Reset Stats button, which sets all player values to 0.

The way I imagine is the request goes to the queue, and when possible, the framework tries to dequeue and resend it. However my stat never gets reset, and the request is never sent, even if I let it to be idle for minutes.

You’re sending too many requests, the DataStore throttles for a while and basically delays your request, it automatically gets sent later, after a while (the delay depends on how many extra requests you send, for instance you can only send about [number of players in server* 10 + 60 ] something Set requests per minute)

use GetRequestBudgetForRequestType

Monitoring and adjusting the frequency of data store requests using this function is recommended.

2 Likes

If you’re datastore is queue ing, there is an issue with the way you’re handling your datastore. You may want to check if you’re sending too many requests.

Basically what @XxELECTROFUSIONxX said lol

I imagine you are making far too many requests as you possibly have several data stores, I would recommend combining all your data stores into a giant table, and then this issue shouldn’t appear anymore, either that or you’re making far too many requests in a short amount of time. Read the following to see if they can resolve your issue.

@velIian @3rdhoan123 @XxELECTROFUSIONxX
Thanks for your answers, let me try to rephrase my point here:

I know I am sending too much request somewhere, but doesn’t my request should get out of the queue some time and get resent? Cause it doesn’t seem to happen any time.

If I let the game idle, it does not send any requests, but the one in the queue remains in the queue as it seems like.

it should, if you send many requests per minute then they’re bound to be delayed for a bit more than a minute. If you send like a thousand requests per minute then those requests will also be throttled, but if the queue for throttled requests was already full then the requests will be dropped entirely.

for instance, all these requests were queued

image

going way over your budget as well as filling the queue causes this

image

so you can’t dequeue requests

1 Like

Most games now don’t auto save, they just save when the player leaves, and load when they join.
This would be an easier way to go about it as it would take less requests and leave more for you in the future.

2 Likes

Well I may have some requests somewhere than. I will experiment with the code than.

Please don’t share my cringe work. I thought somebody actually wanted to talk to me for once :frowning:

1 Like

This was not an answer to my original problem, but I went with this solution, this highly reduces my request amount, so there should be no problem hopefully.

1 Like

that doesn’t mean you shouldn’t auto save at all, you could auto save after set intervals (were you autosaving every second?) and still not have excessive requests.

you could save every 60 seconds for example

One need to wait 5 sec between the request if I recall correctly, so I did it every 6 sec, but as I said the items in the queue didn’t seem to get resent later.