---
title: "Slow Cloud SQL connections through a Serverless VPC Access connector | Proofline"
description: "When Cloud SQL slows down behind a Serverless VPC Access connector, put the connector's throughput, instance count and CPU beside the database's CPU."
url: https://proofline.sh/learn/cloud-run-vpc-connector-cloud-sql-latency/
---

[Learning center](/learn/)

# Slow Cloud SQL connections through a Serverless VPC Access connector

When Cloud SQL slows down behind a Serverless VPC Access connector, put the connector's throughput, instance count and CPU beside the database's CPU. Read both for the same window. A connector at its maximum instances with a flat throughput line is the bottleneck; a quiet connector beside a busy database is not. Connector maintenance explains a different pattern: connections that drop at intervals.

Network outages The Proofline team November 23, 2026 6 min read

## How the symptom shows up

The revision connects to the instance's private IP through a connector, a set of VM instances attached to one VPC network and region. Traffic sent through it into the VPC originates from the connector's /28 subnet or range. [Serverless VPC Access](https://cloud.google.com/vpc/docs/serverless-vpc-access) The application sees longer query times, pool waits, and sometimes connection timeouts, which look like a slow database. If the connections time out outright on every attempt, the route is broken rather than slow. [Private IP connections from Cloud Run time out](/learn/cloud-run-cloud-sql-private-ip-timeout/)

A connector differs from Direct VPC egress in two ways that matter here. Its capacity is a fixed set of VMs of one machine type, and it is shared: every service and job that names it sends traffic through the same instances. [Compare Direct VPC egress and VPC connectors](https://cloud.google.com/run/docs/configuring/connecting-vpc#comparison-table)

## Check 1: read the connector's capacity

```
gcloud compute networks vpc-access connectors describe CONNECTOR \
  --region REGION --project PROJECT \
  --format='yaml(name, network, machineType, minInstances, maxInstances, state)'
```

[`connectors describe`](https://cloud.google.com/sdk/gcloud/reference/compute/networks/vpc-access/connectors/describe) · [Connector resource](https://cloud.google.com/vpc/docs/reference/vpcaccess/rest/v1/projects.locations.connectors)

Larger machine types carry more. Google's estimates are 100 to 500 Mbps for `f1-micro`, 200 to 1,000 Mbps for `e2-micro` and 3,200 to 16,000 Mbps for `e2-standard-4`; its worked example gives `f1-micro` with the default 2 to 10 instances 100 Mbps at the minimum and 500 Mbps at the maximum. The connector scales out under load and does not scale in, and the estimates depend on many factors. [Throughput and scaling](https://cloud.google.com/vpc/docs/serverless-vpc-access#scaling)

Then read its metrics for the incident window. The connector's page in the console charts throughput, the number of instances, and CPU utilization at the 50th, 95th and 99th percentiles, for 1 to 90 days. Google's guidance is to raise the maximum instances when CPU spikes and to move to a larger machine type when throughput is at its limit. [Monitor connector usage](https://cloud.google.com/vpc/docs/configure-serverless-vpc-access#monitor_connector_usage)

| Connector in the window | Reading |
| --- | --- |
| Instances at `maxInstances`, throughput flat at a ceiling, CPU high | The connector is saturated. Queries wait in the network, not in the database |
| Instances rising during the slowdown, then steady | The connector was scaling. Latency during scale-out is expected with connectors |
| Instances below the maximum, CPU and throughput low | Not the connector. Go to check 2 |

Find who else uses the connector. A batch job in another service can fill it while your service's own traffic stays flat:

```
gcloud run services list --project PROJECT --region REGION \
  --format='value(metadata.name, spec.template.metadata.annotations)' \
  | grep 'vpc-access-connector=[^;]*CONNECTOR'
```

The connector is set per revision by the `run.googleapis.com/vpc-access-connector` annotation. [Revision template annotations](https://cloud.google.com/run/docs/reference/rest/v1/RevisionTemplate)

## Check 2: put the database beside it

Read the Cloud SQL instance's CPU utilization and connection count for the same window on its overview page. [Monitor Cloud SQL instances](https://cloud.google.com/sql/docs/postgres/monitor-instance)

| Connector | Database | Reading |
| --- | --- | --- |
| Saturated | CPU normal | The network path limits throughput. Raise the maximum instances or move the service off the connector |
| Normal | CPU high or connections near the limit | The database is the bottleneck. A larger connector will not help |
| Both high | Both high | Look for one source that drives both, such as a new query returning large result sets |

## Check 3: connections that drop at intervals

A different pattern, connections that fail now and then with low load, can come from connector maintenance. Google replaces connector instances during host migrations, base image updates and restarts every two weeks. An instance stops taking new requests one minute before it shuts down. Google's guidance is not to rely on individual connections that last longer than a minute and to use connection pools. If an organization policy blocks the connector's image project, replacement instances fail to start and the instance count can fall over time to zero. [Maintenance and instance replacement](https://cloud.google.com/vpc/docs/serverless-vpc-access#maintenance_and_instance_replacement)

| What you see | Reading |
| --- | --- |
| Resets spread across days, each burst short, pool reconnects | Instance replacement. Make sure the pool validates and replaces connections |
| Instance count falling over days and not recovering | Replacements are failing to start. Read the project's organization policies |

## When Direct VPC egress changes the picture

Direct VPC egress removes the connector VMs: Google lists it with lower latency, higher throughput and no VM charges, and with slower instance autoscaling, including from zero, while it creates network interfaces. [Comparison table](https://cloud.google.com/run/docs/configuring/connecting-vpc#comparison-table) It has its own limits: up to 1 Gbps per container instance, and connection setup at instance startup that can take a minute or more. [Direct VPC egress limitations](https://cloud.google.com/run/docs/configuring/vpc-direct-vpc#limitations) A move from a connector to Direct VPC egress therefore shifts the question from the connector's shared capacity to each instance's startup and the subnet's free addresses.

Moving a service is a deploy: `gcloud run deploy` with `--network` and `--subnet`, plus `--clear-vpc-connector` to drop the connector, creates a new revision with Direct VPC egress. The Direct VPC subnet must be /26 or larger. [`gcloud run deploy`](https://cloud.google.com/sdk/gcloud/reference/run/deploy)

## A worked fixture: the connector or the database

The fixture is illustrative. The fictional service `orders-api` in `europe-west1` reaches `orders-db` at `10.40.0.3` through connector `run-ew1-conn`, machine type `e2-micro`, `minInstances: 2`, `maxInstances: 3`. From 14:00 UTC, the 95th percentile of query time in the application rises from 12 ms to 900 ms.

Outcome A: a shared connector at its ceiling.

| Time (UTC) | Connector instances | Connector throughput | Connector CPU p99 | `orders-db` CPU |
| --- | --- | --- | --- | --- |
| 13:50 | 2 | 90 Mbps | 30% | 35% |
| 14:05 | 3 | 290 Mbps | 97% | 36% |
| 14:30 | 3 | 290 Mbps | 98% | 34% |

The connector reached its maximum of 3 at 14:05 and its throughput stopped rising. The database did not change. The services list shows `reports-export`, a new export job first run at 14:00 today, names the same connector. Move `reports-export` or `orders-api` to Direct VPC egress, or raise the connector's maximum instances. An increase cannot be undone without recreating the connector. [Decrease instances](https://cloud.google.com/vpc/docs/configure-serverless-vpc-access#decrease_minimum_and_maximum_number_of_instances)

Outcome B: the database.

| Time (UTC) | Connector instances | Connector throughput | Connector CPU p99 | `orders-db` CPU |
| --- | --- | --- | --- | --- |
| 13:50 | 2 | 90 Mbps | 30% | 35% |
| 14:05 | 2 | 95 Mbps | 32% | 97% |
| 14:30 | 2 | 92 Mbps | 31% | 98% |

The connector carries about what it carried before. The database's CPU tripled at 14:05. The time is spent in the database; read its queries for the window.

## Where the checks mislead

Google calls the throughput ranges estimates that depend on many factors, including VM network bandwidth. A connector can slow traffic below the table's figure; use the flat line in its throughput chart, not the table, as the sign of a ceiling. [Throughput and scaling](https://cloud.google.com/vpc/docs/serverless-vpc-access#scaling)

A connector that scaled out stays scaled out. Its instance count in the window shows its peak since creation as much as current load, so read CPU and throughput with it.

Pool waits inside the application can look like network latency. Pool size and connection limits per instance are covered in [connection budgets](/learn/connection-limits/), and both sides of the comparison above stay normal when the pool is the limit.

## Questions

### Is a Serverless VPC Access connector slower than Direct VPC egress?

Google lists Direct VPC egress with lower latency and higher throughput than connectors. Connectors add latency during traffic surges while new connector instances start, and their throughput depends on machine type and instance count.

### How do I tell if the VPC connector is the bottleneck for Cloud SQL?

Read the connector's throughput, instance count and CPU charts for the window. Instances at the maximum with throughput flat and CPU high, while the database's CPU stays normal, point at the connector.

### Why do Cloud SQL connections through a VPC connector drop every so often?

Google replaces connector instances during maintenance, and an instance stops accepting new requests a minute before it shuts down. Connections that live longer than that can break; a pool that validates and reopens connections handles 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

-   ### [Private IP connections from Cloud Run to Cloud SQL time out](/learn/cloud-run-cloud-sql-private-ip-timeout/)
    
    Network outages The Proofline team November 23, 2026 6 min read
    
-   ### [How rolling deployments change your PostgreSQL connection budget](/learn/connection-limits/)
    
    Capacity overruns The Proofline team November 5, 2026 9 min read
