question

Falcon Land avatar image
Falcon Land asked

Maximum API request

Hi,

as of today our game starts to throw PlayFab errors for some users. We made no changes to the game build.

It says:

"The client has exceeded the maximum API request rate and is being throttled"

Can you please advice what happened? What should we do or forgot to do? What is the now new maximum API request rate? What was the old one? How can I know what is my current API request rate?

Our game title ID is E957.

If I delay my initial login and loading at the beginning by putting artificial delays(1-2s) between the API calls I am able to overcome this initial loading and play normally afterwards.

 

 

 

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

As part of our limits (http://playfab.com/limits), we're also adding in safeguards for our limits. In doing so, we're taking care to look for cases where we believe titles may have issues and proactively reach out to them ahead of those updates, so I'll check to see how your title wasn't spotted as being potentially impacted.

The specifics of the throttle that's being his are: Each user can only hit GetUserData twice in a two-second period. Any more than that, and they'll encounter the throttle (the user then is un-throttled at the end of that two second period). Given that you can query all the player's user data in a single call, can you help me understand what would cause your title to hit GetUserData that frequently? We can put in a temporary exception for you title if necessary, but we should also address the issue of the call frequency in the title, to make sure it's using the service efficiently.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Falcon Land avatar image
Falcon Land answered

Hi,

thanks for explanation.

The reason why our app uses more GetUserData calls is that there are separate classes, each handling it own problem, and we try to decouple them, so one does not depend on the other and therefore they called their own GetUserData when necessary. And the second very important "reason" is that it was never an issue.

Saying that I understand that this way there is unnecessary more calls and we will redo completely our login process to call GetUserData just once. It will, however, take us a day or two, therefore if you can make an exception for our app for the time being it would be great!

Thanks again for explaining it exactly, we now know what to do

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mailjurassic avatar image
mailjurassic answered

Hello @Brendan I have a related issue

When composing lists of players for creating game leaderboards, I poke the API using GetUserDataRequest's. For each player referenced in the leaderboard retrieved, I need to get 2/3 user keys. However when passing a certain number of players, and randomly, not always, the limits gets enforced, and I get throttled with the msg:

HTTP:400
ERROR:APIClientRequestRateLimitExceeded -- The client has exceeded the maximum API request rate and is being throttled

The question is: how should I been doing this? Is there any API option to batch together many GetUserData calls for different users? (Could not find any). Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Iterating across all players returned by a leaderboard call to get additional data isn't a valid use case, as it generates a very high level of API calls. We will be adding custom data to leaderboards soon, so that you will be able to store additional data on each leaderboard entry, which will then be returned on a call to the leaderboard. For now, I would recommend letting the player "click to view more" about each player, and only request the additional data when the player clicks on an entry.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.