为什么我的 BigQuery 流式插入受到速率限制?

Why are my BigQuery streaming inserts being rate limited?

我在 BigQuery 中进行流式插入时遇到 403 rateLimitExceeded 错误。我正在并行执行许多流式插入,所以虽然我知道这可能是某些速率限制的原因,但我不确定具体的速率限制是什么问题。

这是我得到的:

{ "code" : 403, "errors" : [ { "domain" : "global", "message" : "Exceeded rate limits: Your table exceeded quota for rows. For more information, see https://cloud.google.com/bigquery/troubleshooting-errors", "reason" : "rateLimitExceeded" } ], "message" : "Exceeded rate limits: Your table exceeded quota for rows. For more information, see https://cloud.google.com/bigquery/troubleshooting-errors" }

基于 BigQuery's troubleshooting docs, 403 rateLimitExceeded is caused by either concurrent rate limiting or API request limits,但文档听起来好像这些都不适用于流操作。

然而,错误中的message提到了table exceeded quota for rows,这听起来更像是403 quotaExceeded错误。 streaming quotas 是:

任何 thoughts/suggestions 关于这个速率限制是什么,我们将不胜感激!

我怀疑您偶尔会每秒向单个 table 提交超过 100,000 行。您的并行插入进程有时可能会全部排列在同一个 table 上吗?

将此报告为速率限制错误的原因是为了发出减速信号:要处理单个 table 上的零星操作峰值,您可以后退并重试分散负载。

这与配额失败不同,配额失败意味着重试仍然会失败,直到配额时期结束(例如,每日配额限制)。