I'm getting the servingLimitExceeded
error message for results within batch but not for an entire batch. For example, I may get 100 records responding with this error and then it starts returning more results. All within the a single batch.
If batches are handled internally by Google API, how can I adjust them to not hit the rate limit? I tried adding a 1-second delay between batches but that doesn't change this. I also set retries = 3
on the Ruby client, but I don't know if that means it retries a failed batch. I don't think it's retrying individual API calls within the batch, because the back-off should resolve this.
Do I have to record the failed results and create a new batch to recover those separately?
Incidentally, the documented quota limit errors are confusing. There are dailyLimitExceeded
and rateLimitExceeded
messages but this isn't returning one of those. The servingLimitExceeded
description of "The overall rate limit specified for the API has already been reached" is not all that helpful but I'm assuming this is the rate limit that we hit.
Update
Looking at the code, I see that the retries in the ruby google-api-client
only apply to transmission and authorization (401) errors. A 403 (which is what rate limit returns) raises a ClientError
which is not retried anyway.
So setting retries
on the client object has no bearing on this.
Is there something I can do to address this in the batch?