BigQuery error · Quotas and rate limits
Exceeded rate limits: too many api requests per user per method
One user or service account called the same BigQuery API method too fast. Most methods allow 100 requests per second per user per method; tables.insert and projects.list allow 10. Add exponential backoff, stop tight polling loops, and cache metadata instead of fetching it on every call.
The error message
Exceeded rate limits: too many api requests per user per method for this user_method.
Causes
Polling job status in a tight loop
Code that calls jobs.get or jobs.getQueryResults without a delay while waiting for a query, multiplied across many workers sharing one service account, exceeds the per-method rate quickly.
Metadata calls on every write
Connectors that call tables.get to check whether a table exists before each write are a common source. The troubleshooting docs call out Dataflow's BigQuery I/O with CREATE_IF_NEEDED in Apache Beam versions before 2.24.0.
High-frequency INFORMATION_SCHEMA queries
Dashboards and monitors that query INFORMATION_SCHEMA views every few seconds hit a separate rate limit, reported as Exceeded rate limits: too many rate INFORMATION_SCHEMA queries per user for this user.
Too many concurrent requests
A user can have up to 300 concurrent API requests. Exceeding a concurrency limit per method is reported as Quota exceeded: Your user_method exceeded quota for concurrent api requests per user per method.
How to fix it
1. Retry with exponential backoff
Catch HTTP 403 with reason rateLimitExceeded, wait, and retry with a growing, randomized delay. Most Google client libraries already do this for their own calls; custom HTTP code often doesn't.
2. Wait for results instead of polling
Use the client library's blocking call (for example job.result() in Python), which waits server-side, or poll with a delay of a second or more. Fewer status calls also means fewer requests competing with real work.
3. Materialize INFORMATION_SCHEMA for dashboards
Run one scheduled query that copies the job metadata you need into a table, and point dashboards at that table. Each INFORMATION_SCHEMA query is a billed query (at least 10 MB on-demand), so polling it every few seconds costs money as well as quota.
CREATE OR REPLACE TABLE `project.ops.jobs_last_day` AS
SELECT
job_id,
user_email,
state,
statement_type,
total_bytes_billed,
total_slot_ms,
creation_time
FROM `region-us`.INFORMATION_SCHEMA.JOBS
WHERE creation_time > TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY);4. Cache table metadata and avoid existence checks
Create tables once at deploy time and write with a create disposition of CREATE_NEVER, or cache schema lookups in the worker, so writes don't each trigger a tables.get.
5. Find the method that hits the limit
In the console's API dashboard, choose BigQuery API > Metrics > Traffic by API method and filter by the credential. In Logs Explorer, search for the message text and read protoPayload.methodName.
How to prevent it
- Give each pipeline its own service account so one noisy job doesn't throttle another, and its usage is easy to attribute.
- Use the Storage Write API for high-frequency ingestion; it isn't subject to the BigQuery API request quota.
- Review client retry settings: retries without backoff turn a short throttle into a sustained one.
FAQ
Can I raise the per-user per-method limit?
You can request a quota increase, and Google recommends including the job priority, the user and the affected method. Processing can take several days, so fix polling and caching first.
Do API requests cost money?
BigQuery doesn't limit the number of API requests per day, and this error doesn't bill anything. Queries started through the API are billed as usual, including INFORMATION_SCHEMA queries, which is why polling those views has a cost.
Does this limit apply to streaming inserts?
No. The per-user per-method API limit doesn't apply to streaming inserts, which have their own quotas.
Related
SQL reference
More quotas and rate limits
All BigQuery error messages · What 50M daily events say about BigQuery failures
