Webmaster API v3: getting servingLimitExceeded using batch requests

假如想象 提交于 2019-12-02 18:15:42

问题


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?


回答1:


We received word from Webmaster team that the API is limited to 20QPS and there is currently no way to go higher.

One suggested solution is to make smaller batch requests.



来源:https://stackoverflow.com/questions/29177221/webmaster-api-v3-getting-servinglimitexceeded-using-batch-requests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!