Right now I am making a system that gets the total player count of four sub-places every 30 seconds. I am using MessagingService to accomplish this, and I have kept good note of MessagingService limits. The issue is that I keep getting the “The rate of publish requests exceeds the allowed limit.” Please retry after -2147483648 warning despite the fact I’m only making 8 publish requests per minute (4 every 30 seconds).
Here’s the warning I keep getting every 30 seconds:
What’s odd about this bug is, when I initially designed the system it worked perfectly fine. Just recently it’s started acting like this, not working like how it should + giving me warnings in the logs. I’ve looked all over the DevForum and it doesn’t look like other people have been getting this PublishAsync warning, so I don’t know whether it’s a Roblox bug or a problem in my scripting.
If this turns out to be a real Roblox bug, I’ll move this to Platform Feedback.
Code in each subplace:
game:GetService("MessagingService"):SubscribeAsync("Worlds",function(Info)
local Data = Info.Data
if Data.Command == "GetPlayers" and Data.PlaceId == game.PlaceId then
game:GetService("MessagingService"):PublishAsync("PlayerCount",{PlaceId = game.PlaceId,JobId = game.JobId,PlayerCount = #game.Players:GetPlayers(),Time = Data.Time})
end
end)
Code in the main menu:
function GetWorldPlayerCount(PlaceId)
local Success,ErrorStatement = pcall(function()
WorldPlayerCounts[tostring(PlaceId)] = {}
GetPlayerCountTimes[tostring(PlaceId)] = tick()
game:GetService("MessagingService"):PublishAsync("Worlds",{Command = "GetPlayers",PlaceId = PlaceId,Time = GetPlayerCountTimes[tostring(PlaceId)]})
wait(2.5)
local TotalCount = 0
for _,Data in pairs(WorldPlayerCounts[tostring(PlaceId)]) do
if Data[1] == GetPlayerCountTimes[tostring(PlaceId)] then
TotalCount = TotalCount + Data[2]
end
end
return TotalCount
end)
if not Success then
warn(ErrorStatement)
return 0
end
end
Bumping this post as I also have this error. After a few hours of testing in roblox studios I will get the error. Restarting studios does nothing ether.
"The rate of publish requests exceeds the allowed limit." Please retry after -2147483648 seconds.
I can easily solve it by changing the key name or republishing the game but those are really just band-aid solutions.
In case you’re unaware, there are Roblox api endpoints to retrieve the player count of specific games/places if you need a temporary workaround. That might be a better method overall since it was intended for that purpose.
Sorry to bump this again but this error is very annoying and is making my game suffer because of it. Can we get some confirmation that this is a roblox bug?
I encountered this error so I tried playing the game from the website (off studio) to publish in-game to see if the error still occurred and after joining the game the error went away in-game and in Studio. I believe the issue might be caused due to Studio not being considered a “server” in MessagingService so the rates might not refresh.
I got this error today, but not in studio in the actual game itself and not once in studio so far. If anybody has the fix or knows why this happens please let me know. I’d like to curb this problem before making my game live.