Error code 429 when call Mediation Report API

80 views
Skip to first unread message

Manh Tan Van

unread,
Oct 19, 2023, 10:29:46 AM10/19/23
to AdMob API Developer Forum
Hi team,

We always encounter error code 429 between 9AM and 5PM (Vietnam time) when calling the Admob Mediation Report API.
admob_429.png
And our quotas always were within quota limitation when we made the requests. Add you see, our peak usage was only 4.89% within last 30 days.
admob_quota.png
We have tried to reducing the number of dimensions and used filter to reduce the number of returend rows but not success.

How can we deal with this problem?

Thanks and best regards,
Tan Van Manh

Lin Yang

unread,
Oct 19, 2023, 10:37:09 AM10/19/23
to AdMob API Developer Forum
The monitoring graph from Google Cloud page only tells the QPS against the API. 429 errors could also happen if the request itself is expensive to process, even if overall QPS is low. For example, if request A demands 100 times the amount of RAM and CPU than request B, sending request A at 1 QPS will still be more expensive than sending request B at 10 QPS.

A general solution to this is to optimize the client side request. For example, less dimension breakdowns, more filters, etc. It's also a good idea to further rate-limit on the client side if the request cannot be further optimized.

Manh Tan Van

unread,
Oct 19, 2023, 11:29:15 AM10/19/23
to AdMob API Developer Forum
Hi Lin Yang,

Thank you for your reply. I have two thoughts that I would like to discuss in more detail:
1. The same request with the same dimension breakdowns, same filter conditions can run 100% successfully before 9AM and after 5PM, but fails (429 error) between 9AM and 5PM.
2. Using more filters is a good idea, but how many dimensions x rows should a request return? 

Thanks and best regards, 
Tan Van Manh

Lin Yang

unread,
Oct 19, 2023, 11:49:14 AM10/19/23
to AdMob API Developer Forum
Re. #1, yes that's expected. Quota deduction works on a rolling time window basis. For each account, we have a cap on max amount of resource consumed within any N-minute window.

Re. #2, this is hard to tell as it depends on the size of your account. I would recommend optimizing as much as possible on the client side (e.g. if you're requesting country x date breakdown, consider replacing the country slice with a countries filter instead). Please also feel free to reach out to your AdMob account manager if further technical assistance is needed.

Manh Tan Van

unread,
Oct 19, 2023, 9:19:09 PM10/19/23
to AdMob API Developer Forum
Hi Lin Yang,

#1. What do you mean when you said "max amount of resource consumed within any N-minute window"? Is this what you mentioned?
admob_quota_limits.png
If yes, then as I mentioned before, our quotas always were within quota limitation when we made the requests. If not, is there another unofficial quota limits and how can we see these quotas.

#2. As you recommend, we will try using more filters to determine a reasonable number of returned rows.

Thanks and best regards,
Tan Van Manh

Lin Yang

unread,
Oct 20, 2023, 11:29:06 AM10/20/23
to AdMob API Developer Forum
Sorry for the confusion. No, those quota limits on your screenshot are referring to the API QPS limits. The quota limit I was referring to was about internal machine processing resource caps. #2 is the recommended solution to address #1.

Manh Tan Van

unread,
Nov 1, 2023, 11:26:06 PM11/1/23
to AdMob API Developer Forum
Hi  Lin Yang,

After how long will that quota limit (about internal machine processing resource caps) will be reset. I've applied filter and just breakdown by DATE dimensions but I still get the error code 429.

Thanks and best regards,
Tan Van Manh

Lin Yang

unread,
Nov 2, 2023, 12:05:42 AM11/2/23
to AdMob API Developer Forum
Thanks for the follow up. We reset the quota every day. We might need to take a deeper look into your request pattern and account details. I would recommend reaching out to your AdMob account manager and we can follow up from there.

Manh Tan Van

unread,
Nov 2, 2023, 12:13:39 AM11/2/23
to AdMob API Developer Forum
Hi Lin Yang,

Thanks for your quick reply. I will work with our AdMob Account Manager to raise this our issue as you recommended.

Thanks and best regards,
Tan Van Manh
Reply all
Reply to author
Forward
0 new messages