Jon Chase
Jon Chase

Reputation: 563

Why are my BigQuery streaming inserts being rate limited?

I'm getting 403 rateLimitExceeded errors while doing streaming inserts into BigQuery. I'm doing many streaming inserts in parallel, so while I understand that this might be cause for some rate limiting, I'm not sure what rate limit in particular is the issue.

Here's what I get:

{ "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" }

Based on BigQuery's troubleshooting docs, 403 rateLimitExceeded is caused by either concurrent rate limiting or API request limits, but the docs make it sound like neither of those apply to streaming operations.

However, the message in the error mentions table exceeded quota for rows, which sounds more like the 403 quotaExceeded error. The streaming quotas are:

Any thoughts/suggestions as to what this rate limiting is would be appreciated!

Upvotes: 1

Views: 2503

Answers (1)

Michael Sheldon
Michael Sheldon

Reputation: 2057

I suspect you are occasionally submitting more than 100,000 rows per second to a single table. Might your parallel insert processes occasionally all line up on the same table?

The reason this is reported as a rate limit error is to give a push-back signal to slow down: to handle sporadic spikes of operations on a single table, you can back off and try again to spread the load out.

This is different from a quota failure which implies that retrying will still fail until the quota epoch rolls over (for ex, daily quota limits).

Upvotes: 2

Related Questions