Traffic estimator service returns '[RateExceededError <rateName=RATE_LIMIT, rateKey=null, rateScope=ACCOUNT, retryAfterSeconds=30>]'

97 views
Skip to first unread message

Ildar Khakimov

unread,
Nov 28, 2017, 3:25:12 PM11/28/17
to AdWords API Forum
Good day

While running the traffic estimator service it throws the following error:
'[RateExceededError <rateName=RATE_LIMIT, rateKey=null, rateScope=ACCOUNT, retryAfterSeconds=30>]'

The error comes up at varying intervals, there doesn't seem to be a specific number of results returned before it throws an error.

The API limit is definitely not exceeded. I also reviewed the discussion here: https://groups.google.com/forum/#!msg/adwords-api/SrsJf990r2s/SsWB_tSzKSsJ , but seems like that this problem is not fixed.

What can be done to fix this?

Can I use the BatchJobService or it's used solely when creating new campaigns?

Full error:

Fatal error: Uncaught exception 'Google\AdsApi\AdWords\v201705\cm\ApiException' with message '[RateExceededError <rateName=RATE_LIMIT, rateKey=null, rateScope=ACCOUNT, retryAfterSeconds=30>]' in /Applications/MAMP/htdocs/kw classification/adwords_API/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php:39 Stack trace: #0 /Applications/MAMP/htdocs/kw classification/adwords_API/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php(39): ReflectionClass->newInstanceArgs(Array) #1 /Applications/MAMP/htdocs/kw classification/adwords_API/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(162): Google\AdsApi\Common\Util\Reflection->createInstance('Google\\AdsApi\\A...', '[RateExceededEr...') #2 /Applications/MAMP/htdocs/kw classification/adwords_API/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(126): Google\AdsApi\Common\AdsSoapClient->parseApiExceptionFromSoapFault(Object(SoapFault)) #3 /Applications/MAMP/htdocs/kw cla in /Applications/MAMP/htdocs/kw classification/adwords_API/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php on line 39

Peter Oliquino

unread,
Nov 29, 2017, 2:55:54 AM11/29/17
to AdWords API Forum
Hi Ildar,

I could see that you are getting the rateScope=ACCOUNT included in the error logs. This indicates that you are making too many requests or invoking multiple threads at the same time against a single AdWords account. I would recommend that you reduce the number of operations you invoke all at once in order to avoid this error. To learn more about the limits when using the AdWords API, you may refer to our rate limits guide, specifically to this section for your issue, and to our rate sheet

As for creating multiple campaigns, yes, you may use the BatchJobService since it supports the CampaignOperation, however, it does not currently support the TrafficEstimatorService. For more information on batch processing, you may refer here. I hope this has been helpful.

Thanks and regards,
Peter
AdWords API Team

Ildar Khakimov

unread,
Nov 29, 2017, 11:32:40 AM11/29/17
to AdWords API Forum
Hi Peter

It's strange because I'm including batches of 2k keywords per request and doing it only 1 batch at a time.

Simple solution for me was to wrap the request in a try/catch block, so when the $apiexception was detected I would simply sleep for 30 seconds and then retry
again on a subsequent loop.

This solved the problem
Reply all
Reply to author
Forward
0 new messages