且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

网站管理员API-配额限制

更新时间:2023-12-02 16:31:52

我发现声明的配额似乎并不是真正的配额.即使我一直处于或低于规定的速率限制(20/秒),我也必须降低请求速度以避免出现同样的问题(1/秒).此外,它声称它在文档中给出了rateLimitExceeded错误,因为它执行得太快了,但实际上它返回了quotaExceeded错误.这可能与Google如何随时间平均请求速率有关(因为我们提出的某些请求是同时发生的,即使长期平均值被设计为等于或低于20/sec),但我不确定

I've found that the stated quotas don't really seem to be the quotas. I had to slow my requests down to avoid this same issue (1/sec), even though I was always at or below the stated rate limit (20/sec). Furthermore, it claims that it gives a rateLimitExceeded error in the docs for going too fast, but really it returns a quotaExceeded error. It might have to do with how Google averages the rate of requests over time (as some of the requests we made were simultaneous, even though the long-run average was designed to be at or below 20/sec), but I cannot be sure.