Upper limit on Operations per Request

730 views
Skip to first unread message

Ian

unread,
Nov 17, 2011, 6:37:41 PM11/17/11
to AdWords API Forum
While doing some performance testing on our application against the
sandbox. I've been hitting this error:

<detail>
<ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/
v201109">
<message>RateExceededError &lt;rateName=Operations,
rateKey=new_request, rateScope=ACCOUNT, retryAfterSeconds=30&gt;</
message>
<ApplicationException.Type>ApiException</ApplicationException.Type>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="RateExceededError">
<fieldPath></fieldPath>
<trigger></trigger>
<errorString>RateExceededError.RATE_EXCEEDED</errorString>
<ApiError.Type>RateExceededError</ApiError.Type>
<reason>RATE_EXCEEDED</reason>
<rateName>Operations</rateName>
<rateScope>ACCOUNT</rateScope>
<retryAfterSeconds>30</retryAfterSeconds>
</errors>
</ApiExceptionFault>
</detail>

According to this page: http://code.google.com/apis/adwords/docs/appendix/limits.html
the limit per request is 2000, has this changed recently? if so what
is the new limit/recommendation?

Danial Klimkin

unread,
Nov 22, 2011, 8:20:00 AM11/22/11
to adwor...@googlegroups.com
Hello Ian,


This error usually means you are sending your requests too fast rather than the number of of operations is too high. Please see the following post for more details:


Please also note the maximum rates in Sandbox and Production differ (Production environment has much higher capacity).


-Danial, AdWords API Team.

Ian

unread,
Nov 23, 2011, 9:19:59 PM11/23/11
to AdWords API Forum

This is from too many operations: note the rateName element in the
error.

On Nov 22, 8:20 am, Danial Klimkin <danial.klimkin+fo...@google.com>
wrote:


> Hello Ian,
>
> This error usually means you are sending your requests too fast rather than
> the number of of operations is too high. Please see the following post for
> more details:
>

>  http://adwordsapi.blogspot.com/2010/06/better-know-error-rateexceeded...

Danial Klimkin

unread,
Nov 24, 2011, 10:09:37 AM11/24/11
to adwor...@googlegroups.com
Hello Ian,


Correct, but it is too many operations per time period, not request. I would like to repeat the limits are different for the production environment.

Also, please consider using MutateJobService which is specifically designed to handle large requests.


-Danial, AdWords API Team.

Ian

unread,
Nov 28, 2011, 3:13:56 PM11/28/11
to AdWords API Forum
Sorry for the delayed response I was on vacation.

I guess I am confused. If I send one request with 2000 operations
regardless of the time period between requests, I get the above
RateExceededError EVERY TIME. If I send 8 request with 500 ops each
simultaneously from different threads for same account, I get no
errors. So empirically, I don't get how this is an ops/s issue instead
of just a to many ops issue.

also on a side note, having different limits in the sandbox vs.
production severely hampers any optimization attempts since doing
performance testing against production is prohibitively expensive, and
the different limits renders any results invalid.


On Nov 24, 7:09 am, Danial Klimkin <danial.klimkin+fo...@google.com>
wrote:

Eric Koleda

unread,
Dec 1, 2011, 5:09:45 PM12/1/11
to adwor...@googlegroups.com
Hi Ian,

Can you provide more context on what services you are using when you hit this rate limit?  Against the sandbox or production?  

Best,
- Eric Koleda, AdWords API Team

Dan Ricker

unread,
Mar 26, 2012, 6:37:33 PM3/26/12
to adwor...@googlegroups.com
I can provide a concrete example.
 
NOTE: it would also be nice if I could find a list of possible "rateName" values
 
15XX items in adGroupCritKeywords results in:
 
       Message=RateExceededError <rateName=Operations, rateKey=new_request, rateScope=ACCOUNT, retryAfterSeconds=30>
 
        internal IEnumerable<AdGroupCriterion> AddKeyWords(IEnumerable<AdGroupCriterion> adGroupCritKeywords)
        {
            List<AdGroupCriterionOperation> operations = new List<AdGroupCriterionOperation>();
            AdGroupCriterionOperation oneOperation = null;
            foreach(AdGroupCriterion adGroupCritKeyword in adGroupCritKeywords)
            {
                oneOperation = new AdGroupCriterionOperation();
                oneOperation.@operator = Operator.ADD;
                oneOperation.operand = adGroupCritKeyword;
                operations.Add(oneOperation);
            }
 
            AdGroupCriterionReturnValue retVal = null;
            try
            {
                AdGroupCriterionService adGroupCriterionService = (AdGroupCriterionService)(this.AdWordsUser.GetService(AdWordsService.v201109.AdGroupCriterionService));
                retVal = adGroupCriterionService.mutate(operations.ToArray());
            }
            catch (System.Exception ex)
            {
                throw new System.Exception("Failed to add Keywords", ex);
            }
            return retVal.value;
        }
 

Anash P. Oommen

unread,
Mar 27, 2012, 3:25:49 AM3/27/12
to adwor...@googlegroups.com
Hi Dan,

The list of possible values for rateName aren't externally published. You could however handle RateExceededError gracefully in your application. You can find more information about RateExceededError here: http://adwordsapi.blogspot.com/2010/06/better-know-error-rateexceedederror.html

Another option is to consider using MutateJobService as Danial suggested. The service would handle RateExceededError for you.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Dan Ricker

unread,
Mar 27, 2012, 8:37:23 AM3/27/12
to adwor...@googlegroups.com
Thx for the response Anash. All is completely understood,
 
I was only providing a "context" that Eric asked about.

Anash P. Oommen

unread,
Mar 29, 2012, 5:42:48 AM3/29/12
to adwor...@googlegroups.com
Hi Dan,

Sure. Let me know if you have more questions and I'll help you out.

Cheers,
Anash P. Oommen,
AdWords API Advisor.
Reply all
Reply to author
Forward
0 new messages