---
title: "Cloud SQL Admin API 429s when Cloud Run scales out | Proofline"
description: "Cloud Run instances that start in the same minute each call the Cloud SQL Admin API, and together they can exhaust one service account's per-minute quota."
url: https://proofline.sh/learn/cloud-sql-admin-api-quota-cloud-run-scale-out/
---

[Learning center](/learn/)

# Cloud SQL Admin API 429s when Cloud Run scales out

Cloud Run instances that start in the same minute each call the Cloud SQL Admin API, and together they can exhaust one service account's per-minute quota. Each instance's Cloud SQL connection asks for the database instance's connection details and a certificate. Find the credential behind the 429s, then cap the burst, connect to fewer instances, split service accounts, raise the quota, or take a path without the Admin API.

Capacity overruns The Proofline team November 23, 2026 7 min read

## How it shows up

A traffic spike makes Cloud Run add instances quickly, and some of the new instances cannot connect to the database while the older ones keep working. The error comes from the authorization stage of [the four stages](/learn/cloud-run-cloud-sql-connection-errors/#stage): the Cloud SQL Admin API answers HTTP 429 with the reason `rateLimitExceeded`. How the built-in connection or a connector words it in the logs varies, so search the revision's errors for `429` and `rateLimitExceeded`. [Rate quotas](https://cloud.google.com/sql/docs/quotas) · [Troubleshooting: 429](https://cloud.google.com/sql/docs/postgres/troubleshooting)

The errors stop on their own within a minute or two, which makes them easy to mistake for a database hiccup. Cloud SQL enforces and refills rate quotas over 60-second intervals, so the instances that were refused succeed once the next interval begins, if they retry.

## Where the calls come from

Cloud Run's built-in connection runs the Cloud SQL Auth Proxy, which uses the Cloud SQL Admin API, and the language connectors use it too. Each connector runs a refresh about once an hour, and each refresh makes two calls: one for the instance's metadata and one for an ephemeral certificate. Cloud Run's page gives the quota one service uses as approximately two times the number of Cloud SQL instances configured, times the number of Cloud Run instances running at any one time. An instance that just started has no certificate yet, so a burst of starts is a burst of calls. [Connect from Cloud Run: API quota limits](https://cloud.google.com/sql/docs/postgres/connect-run) · [Quota usage for connectors](https://cloud.google.com/sql/docs/quotas)

Those calls fall in the Admin API's Connect category, which covers `GetConnectSettings` and `GenerateEphemeralCertificates` and has a default limit of 1,000 requests per minute. Cloud SQL applies each category's quota per minute, per user and per region, and a service account is a user here. The Cloud Quotas page shows aggregate project usage, so one service account can exhaust its own quota while the page still shows quota available. [Rate quota categories](https://cloud.google.com/sql/docs/quotas)

So the figure to compare with the limit is:

```
Connect calls in one minute ≈ Cloud Run instances started that minute
                              × Cloud SQL instances the revision connects to
                              × 2
                              (per service account)
```

Calls from `gcloud` and the console count against the quotas of whoever makes them, in their own categories. Cloud Run's autoscaling page names the Cloud SQL API quota as a limit a fast scale-out can reach. [Autoscaling and backing services](https://cloud.google.com/run/docs/about-instance-autoscaling)

## Check 1: which credential received the 429s?

Cloud SQL's troubleshooting steps use Metrics Explorer in the project that makes the requests:

1.  Select the metric `serviceruntime.googleapis.com/api/request_count` (Consumed API, Api, Request count).
2.  Filter `response_code` = `429` and `service` = `sqladmin.googleapis.com`. Optionally filter by `method`.
3.  Aggregate with Sum, grouped by `credential_id`.
4.  Look up the credential ID with the most 429s on the Service accounts page; it is the OAuth 2.0 client ID of the service account.

[Troubleshoot rate limit errors](https://cloud.google.com/sql/docs/quotas)

Then read which service account the revision runs as and how many Cloud SQL instances it connects to:

```
gcloud run revisions describe REVISION \
  --project PROJECT --region REGION \
  --format='yaml(metadata.annotations, spec.serviceAccountName)'
```

`run.googleapis.com/cloudsql-instances` lists the revision's Cloud SQL connections, comma-separated. [Revision template annotations](https://cloud.google.com/run/docs/reference/rest/v1/RevisionTemplate)

## Check 2: did the scale-out make enough calls?

Count the instance starts per minute from the revision's `varlog/system` entries with the reason `AUTOSCALING`, or read `container/instance_count` for the window. Multiply as above and compare with the Connect limit for that service account. [Instance scaling logs](https://cloud.google.com/run/docs/logging) · [Cloud Run metrics](https://cloud.google.com/monitoring/api/metrics_gcp_p_z)

| 429s on the service's credential | Calls from starts in the peak minute | Reading |
| --- | --- | --- |
| Yes | Near or above the limit | The scale-out exhausted the quota |
| Yes | Well below | Something else uses the same service account: another service, a job or a script. Check what else runs as it |
| No, another credential | Any | That credential's quota ran out; the service's own errors have another cause |
| No 429s at all | Any | Not the Admin API quota. Read the full error again |

## Choose the lever

| Lever | What it changes | Cost |
| --- | --- | --- |
| Drop unused Cloud SQL connections from the revision | Each instance's calls fall by two for every instance removed from `cloudsql-instances` | None, if nothing uses them |
| Cap maximum instances, or keep a minimum warm | Fewer starts per minute | Capacity: requests beyond the cap wait and may fail with 429 from Cloud Run. Minimum instances cost while idle |
| One service account per workload | Each account gets its own per-user quota | IAM grants for each account |
| Request a higher quota | A higher Connect limit | A quota request in advance; no charge for asking |
| Connect to the private IP directly | The driver connects to the instance's private IP on port 5432, with no Auth Proxy or connector and therefore no per-instance Admin API calls | A different path: Direct VPC egress or a connector, and TLS and authentication you configure yourself |

[Maximum instances](https://cloud.google.com/run/docs/configuring/max-instances) · [Increase quotas](https://cloud.google.com/sql/docs/quotas) · [Private IP from Cloud Run](https://cloud.google.com/sql/docs/postgres/connect-run)

Before switching paths, [check which path the revision uses now](/learn/which-path-cloud-run-uses-to-reach-cloud-sql/). Each change to the revision, such as its Cloud SQL connections or maximum instances, deploys a new revision. A service-level maximum changes without one.

## A worked fixture: two evenings of 429s

The fixture is illustrative. `orders-api` runs as `orders-runtime@shop-prod.iam.gserviceaccount.com`. Its revision `orders-api-00018` lists two Cloud SQL connections: `shop-prod:europe-west1:orders-db` and `shop-prod:europe-west1:orders-db-replica`. Each new instance makes about 2 × 2 = 4 Connect calls. The Connect quota is at its default, 1,000 per minute.

**Evening A, 2026-11-20.** A promotion starts at 18:00 UTC. Between 18:00:05 and 18:01:00, `varlog/system` records 260 `AUTOSCALING` starts for `orders-api-00018`: about 260 × 4 = 1,040 calls in under a minute. From 18:00:51, new instances log Admin API errors with HTTP 429 and `rateLimitExceeded`, and requests routed to them fail. Metrics Explorer shows 52 responses with code 429 for one `credential_id`, which the Service accounts page maps to `orders-runtime`. The errors stop at 18:01:58 as retries succeed in the next intervals.

The arithmetic fits: 1,000 calls cover 250 instances, so the last ten instances' 40 first calls were refused, and their retries inside the same minute account for the rest. The code reads the replica only for a report that moved to another service months ago. The team removes `orders-db-replica` from the revision's Cloud SQL connections, which halves the calls per instance to 2, and requests a higher Connect quota before the next promotion.

**Evening B, 2026-11-22.** At 19:10 UTC, `orders-api` logs connection errors on new instances during a smaller scale-out of 40 instances, and someone links them to Evening A. Metrics Explorer shows 429s from `sqladmin.googleapis.com`, but grouped by `credential_id` they all belong to `deploy-bot@shop-prod.iam.gserviceaccount.com`, a pipeline that polls `gcloud sql instances describe` in a loop during a migration. `orders-runtime` has none; its 40 starts made about 80 calls. The pipeline exhausted its own quota, not the service's. The service's errors at 19:10 carry SQLSTATE `53300`, which sends the investigation to the [connection budget](/learn/cloud-run-cloud-sql-connection-budget/).

## Where the checks mislead

The Cloud Quotas page shows project-level usage. Because Cloud SQL enforces rate quotas per user, a single service account can be throttled while the project's totals look fine; group the 429s by credential before deciding the quota is not the cause.

Cloud Run can start more instances than its maximum for short periods during replacements, so a cap reduces the burst but does not set a hard ceiling. Leave margin below the quota.

The formula on Cloud Run's page is approximate. Retries after a 429 add calls, and an application that creates a new connector object per request instead of per instance makes its own calls each time. If the measured 429s exceed what the starts explain, look for connector objects created outside the instance's global scope. [Global variables](https://cloud.google.com/run/docs/tips/general)

## Questions

### Why do Cloud Run instances get 429 errors from the Cloud SQL Admin API?

Each instance's Cloud SQL connection calls the Admin API for the instance's connection details and an ephemeral certificate. When many instances start within one minute under the same service account, those calls can exceed the per-minute, per-user Connect quota, and the API answers HTTP 429 with `rateLimitExceeded`.

### How many Cloud SQL Admin API calls does a Cloud Run service make?

Cloud Run's documentation puts it at approximately two times the number of Cloud SQL instances the revision connects to, times the number of Cloud Run instances running. Connectors refresh about once an hour, so the bursts come from instances starting together.

### Why does the Quotas page show quota available when I get rateLimitExceeded?

Cloud SQL enforces rate quotas per minute, per user and per region, and the Quotas page shows aggregate project usage. One service account can exhaust its own quota while the project total still has room. Group the 429s by `credential_id` in Metrics Explorer to find it.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Cloud Run cannot reach Cloud SQL: revision, identity or connection?](/learn/cloud-run-cloud-sql-connection-errors/)
    
    Broken dependencies The Proofline team November 23, 2026 10 min read
    
-   ### [How many Cloud SQL connections can a Cloud Run service open?](/learn/cloud-run-cloud-sql-connection-budget/)
    
    Capacity overruns The Proofline team November 23, 2026 7 min read
