Memoryservice UpdateAsync "Request Failed"

Right now, there is certainly some instability on the servers.
My game is still in development and sometimes I got this error when running the script on Studio:

Request Failed

I’m getting the error “Request Failed” in a UpdateAsync operation of the MemoryService, where I’ve never had an error before:

local MemoryService = game:GetService("MemoryStoreService")
local SMUsersOnline = MemoryService:GetSortedMap("UsersOnline")
SMUsersOnline:UpdateAsync('UsersOnline', 
	function(UsersOnline)
--> some script
		return UsersOnline
	end, 
	60*60*24
)

As I said, it’s an error that appeared for the first time in months.
But still, it can happen again.
In this case, I ask.

  1. If I don’t do an error handling with pcall, what can happen during the game?
  2. If using pcall what would be the best way to handle this MemoryService unavailability? Should I make a counter with retry to a limit?

Any suggestion?

Okay, it looks like it’s an intermittent error, so I was able to stabilize it this way:

repeat
	local Success, Errormessage = pcall(function()
		SMUsersOnline:UpdateAsync('UsersOnline', 
			function(UsersOnline)
--> some script
				return UsersOnline
			end, 
			60*60*24
		) -- salva tabela de todos usuários online atualizada (validade 24 horas)
	end)
	if not Success then
		print("Error SMUsersOnline:UpdateAsync. Trying again.")
		warn(Errormessage)
		wait(1)
	end
until Success

I’m getting intermittent failures with MemoryStores too, I’m assuming Roblox is having issues.

2 Likes