Hey developers. I am currently working on a game that loads assets directly from the catalog, so at the start of a server all the assets are loaded into the game using InsertService. This all works fine, but when I initially try to load the assets into the game as arrays it takes so long because of the error “HTTP 429 (Too Many Requests)”.
I have this pcalled, and my code simply warns, waits a couple of seconds, and retries. However, it significantly beefs up loading time.
Here are the links I’m using:
local Links = {
Shirts = "https://catalog.rprxy.xyz/v1/search/items?category=Clothing&limit=100&maxPrice=999&minPrice=5&sortAggregation=3&sortType=2&subcategory=Shirts";
Pants = "https://catalog.rprxy.xyz/v1/search/items?category=Clothing&limit=100&maxPrice=999&minPrice=5&sortAggregation=3&sortType=2&subcategory=Pants";
Faces = "https://catalog.rprxy.xyz/v1/search/items?category=BodyParts&limit=100&sortAggregation=3&sortType=1&subcategory=Faces";
Hats = "https://catalog.rprxy.xyz/v1/search/items?category=Accessories&limit=100&sortAggregation=3&sortType=1&subcategory=Hats";
Hair = "https://catalog.rprxy.xyz/v1/search/items?category=Accessories&limit=100&sortAggregation=3&sortType=1&subcategory=HairAccessories";
Face = "https://catalog.rprxy.xyz/v1/search/items?category=Accessories&limit=100&sortAggregation=3&sortType=1&subcategory=FaceAccessories";
Neck = "https://catalog.rprxy.xyz/v1/search/items?category=Accessories&limit=100&sortAggregation=3&sortType=1&subcategory=NeckAccessories";
Shoulder = "https://catalog.rprxy.xyz/v1/search/items?category=Accessories&limit=100&sortAggregation=3&sortType=1&subcategory=ShoulderAccessories";
Front = "https://catalog.rprxy.xyz/v1/search/items?category=Accessories&limit=100&sortAggregation=3&sortType=1&subcategory=FrontAccessories";
Back = "https://catalog.rprxy.xyz/v1/search/items?category=Accessories&limit=100&sortAggregation=3&sortType=1&subcategory=BackAccessories";
Waist = "https://catalog.rprxy.xyz/v1/search/items?category=Accessories&limit=100&sortAggregation=3&sortType=1&subcategory=WaistAccessories";
}
And here’s a simplification of my code:
for Name, Link in pairs(Links) do
local Info
while true do
local Success, Result = pcall(function()
local Feedback = HTTPService:GetAsync(Link)
Feedback = HTTPService:JSONDecode(Feedback)
return Feedback
end)
if Success then Info = Result break else warn("Error loading link, retrying\n" .. Result) end
wait(1)
end
end
Does anyone have any way of bypassing this? Thanks!
Endpoint rate limits exist for a reason. You can’t sidestep them from the game server because the rate limits are implemented on the web server itself serving the endpoints. You will have to take increased loading time if you want to be able to perform this without issue. Try for 100 requests/minute, I believe this is the rate limit for your specific use case.
If that’s the case, why am I getting these errors?
Do MarketplaceService requests and InsertService requests count as a HTTP request? If not I am only requesting the 11 links.
You’re getting those errors because again there’s rate limits for web calls.
InsertService and MarketplaceService methods are web calls and are subject to their own internal limits though they differ because they’re calling directly from Roblox endpoints. Those web calls do not adhere to the 500 requests/minute limit that HttpService has but mind you these are limits for the game server not the endpoint, an endpoint can easily sport different limits lower or higher.
Your retry window is also too low, worth noting. Rate limits are typically per minute. Retrying them in the next second won’t give you a successful call, hence why the warning is shown repeated x137 in the console. Not too sure of the full scope of your operation but if you’re getting HTTP 429 then you need to reduce your calling amount or put more space between requests.
You can have as little or as many requests to any endpoint, Roblox or not, but the HTTP status code in itself is already telling of what you need to do here and that’s to put more time between the requests that are being made.
This is a status code that’s being given from the endpoint not your game code. If you’re sending 11 requests at the start and it’s telling you you’re sending too many, then you’re sending too many and you need to reduce how many calls you’re making at one time (in this case, per minute). Can’t sidestep that and the endpoint isn’t going to settle for a different approach.