Reproduction Steps
To reproduce this bug go into this game:
And run the following code in the console:
local Ah = game:GetService('MemoryStoreService'):GetQueue('Clicks3_TaskQueue')
while true do
print(1)
local Range = Ah:ReadAsync(
1
)
print(2)
print(Range)
break
end
You will be able to observe that ‘1’ prints but ‘2’ never prints.
Expected Behavior
I would expect the call to proceed within a reasonable time frame (I think it normally takes ~0.15 seconds) but it seems to be taking an indefinite amount of time.
Actual Behavior
‘1’ prints and nothing else, Additionally i’m getting a lot of errors saying im surpassing my memory quota however i’ve gone through every sorted map and queue in the game and I don’t think we are using any more then perhaps a few KB of data and i’m wondering if data perhaps isn’t being cleared up correctly either due to a bug or an issue with my code. It would be useful to be able to inspect what maps have memory allocated to them from the dev console
Workaround
I currently have no workaround
Issue Area: Engine Issue Type: Other Impact: High Frequency: Constantly Date First Experienced: 2022-03-10 00:03:00 (+00:00) Date Last Experienced: 2022-03-10 00:03:00 (+00:00)
The default behavior is to wait indefinitely until the required number of items are available from the queue. You can specify a different waitTimeout to complete the call early.
This is explained in the documentation and the sample code shows how to use the waitTimeout MemoryStoreQueue:ReadAsync.
Thank you, that’s definitely my bad I wrote some botched code to try and work out what was taking up so much memory, do you know if there is any way I can access some sort of log of what is taking up memory on my memory stores?
The expiration time is 30 days since I’m dealing with user trades and I didn’t want it to time out at all automatically, this is then worsened by the fact for each trade I generated a seperate sorted map with a randomly generated ID to get around the 100,000 requests/map limit which means there is to my knowledge no existing way for me to see where memory is being allocated.
I’m not entirely sure if It is my trades which are taking up the memory since I have 2 systems that Rely on memory store in the game, however leaderbosrd I think I’ve thoroughly checked however to my knowledge I’m also cleaning up the trades properly unless the sorted maps themselves take up memory