---
title: "Writes from Cloud Run fail: is the Cloud SQL disk full? | Proofline"
description: "Read the instance's disk utilization and its automatic storage increase settings before blaming the latest revision."
url: https://proofline.sh/learn/cloud-sql-storage-full-cloud-run/
---

[Learning center](/learn/)

# Writes from Cloud Run fail: is the Cloud SQL disk full?

Read the instance's disk utilization and its automatic storage increase settings before blaming the latest revision. A disk that is nearly full with automatic increases off, or held at their limit, makes writes fail, and Cloud SQL then stops the instance.

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

## How a full disk shows up

A full disk does not announce itself as a connection problem at first. PostgreSQL's documentation says a filled data disk does not corrupt data but can prevent useful activity, and that a full disk under the write-ahead log can make the server panic and shut down. PostgreSQL's error code for the condition is SQLSTATE `53100` (`disk_full`), and the driver reports it as a query error on a connection that otherwise works. [Disk full failure](https://www.postgresql.org/docs/current/diskusage.html) · [PostgreSQL error codes](https://www.postgresql.org/docs/current/errcodes-appendix.html)

Which requests fail follows from which statements need space. Inserts, updates and anything that writes the log fail; a query that reads existing rows and fits in memory may still return. Writes failing while reads succeed therefore points at the disk. PostgreSQL does not promise that reads keep working, and queries that spill to temporary files need space too, so treat the pattern as a lead to check, not a test.

The second phase is a full outage. When an instance is nearly out of storage, Cloud SQL stops it to prevent the loss of information, and the console shows a banner suggesting more storage and automatic increases. If the instance runs out of space entirely, it goes offline and existing connections drop. From that point every connection fails, at stage 1 or stage 4 of the hub's [stage table](/learn/cloud-run-cloud-sql-connection-errors/#stage), and the guide to [a stopped or suspended instance](/learn/cloud-sql-instance-stopped-or-suspended/) applies too. [Stop an instance](https://cloud.google.com/sql/docs/postgres/start-stop-restart-instance#stop) · [`--storage-auto-increase`](https://cloud.google.com/sdk/gcloud/reference/sql/instances/patch)

## Check 1: how full is the disk, and can it grow?

Read the storage settings and the out-of-disk report:

```
gcloud sql instances describe INSTANCE --project PROJECT \
  --format='yaml(state, settings.dataDiskSizeGb, settings.storageAutoResize, settings.storageAutoResizeLimit, outOfDiskReport)'
```

| Field | Meaning |
| --- | --- |
| `settings.storageAutoResize` | Whether automatic storage increases are on. The default is `true` |
| `settings.storageAutoResizeLimit` | The size, in GB, the disk may grow to. `0` means no limit |
| `settings.dataDiskSizeGb` | The current provisioned size |
| `outOfDiskReport.sqlOutOfDiskState` | `NORMAL`, or `SOFT_SHUTDOWN` when the data disk is almost used up and the instance was shut down to prevent data corruption |

[Instance resource](https://cloud.google.com/sql/docs/postgres/admin-api/rest/v1/instances)

With automatic increases on, Cloud SQL checks available storage every 30 seconds and adds capacity when it falls below a threshold. For SSD and HDD storage the threshold is `MIN(5 + provisioned GB / 25, 25)` GB, rounded down, and each increase adds that same amount. Increases stop at the limit, and for Hyperdisk Balanced, increases that come too often within four hours can be throttled, so an instance can run out of space with the setting on and the size below the limit. [Automatic storage increases](https://cloud.google.com/sql/docs/postgres/instance-settings)

Automatic increases are recorded as System Event audit entries with the method `cloudsql.instances.automaticStorageIncrease`, which Cloud SQL always writes, so an empty result for the hours before the errors means the disk did not grow. [Cloud SQL system events](https://cloud.google.com/sql/docs/postgres/audit-logging#system-events)

Then read the metrics over the incident window in Metrics Explorer, resource type Cloud SQL Database:

| Metric | What it shows |
| --- | --- |
| `database/disk/utilization` | The fraction of the disk quota in use |
| `database/disk/bytes_used` and `database/disk/quota` | Bytes used and the maximum data disk size |
| `database/disk/bytes_used_by_data_type` | Usage split into data, WAL, temporary data and other types |

All are sampled every 60 seconds and can take up to 165 seconds to appear. [Cloud SQL metrics](https://cloud.google.com/monitoring/api/metrics_gcp_c) · [Disk usage by data type](https://cloud.google.com/sql/docs/postgres/troubleshooting)

| Disk utilization | Automatic increase | Reading |
| --- | --- | --- |
| Near 1.0 | Off, or the size equals the limit | Storage. The disk cannot grow, and writes fail until someone adds space |
| Near 1.0 | On, below the limit | Growth outran the increases. Find the data type that grew: WAL, temporary data or tables |
| Well below 1.0 | Any | Not storage. Read the error's stage again |

## Check 2: does the growth line up with the deploy?

A full disk is a shared condition: every revision's writes fail. The deploy matters only if the new revision is what filled it. Compare the slope of `database/disk/bytes_used_by_data_type` before and after the revision took traffic. A new revision that writes far more rows, keeps a long transaction open so that WAL accumulates, or runs queries that spill to temporary files changes the slope at the moment its instances start. A slope that was steady for days and simply reached the ceiling has nothing to do with the deploy. [Find when the revision started serving](/learn/when-did-the-rollout-start-serving/)

## A worked fixture: same error rate, two databases

The fixture is illustrative. `orders-db` has 100 GB of SSD storage. `orders-api-00018` took all traffic at 10:02:00 UTC; at 10:20 order creation starts failing while order lookups keep working.

**Database A.** The description:

```
outOfDiskReport:
  sqlOutOfDiskState: NORMAL
settings:
  dataDiskSizeGb: '100'
  storageAutoResize: true
  storageAutoResizeLimit: '100'
state: RUNNABLE
```

Automatic increases are on, but the limit equals the current size, so the disk cannot grow. The SSD threshold for 100 GB is `MIN(5 + 100/25, 25)` = 9 GB; below 9 GB free, Cloud SQL would have added storage if the limit allowed it. `database/disk/utilization` rose from 0.89 at 09:00 to 0.998 at 10:19, under 0.2 GB free on 100 GB. The `INSERT` errors carry SQLSTATE `53100`, from both `orders-api-00018` and a fresh `orders-api-00017` instance started through its tag. The deploy did not cause this. Raising the size or the limit is a change to the instance that someone with that authority must make, and soon: an instance this close to full can be stopped.

**Database B.** Same symptom, different readings. `storageAutoResizeLimit` is `0` and utilization is 0.64. The failing writes return SQLSTATE `53300` (`too_many_connections`) on new connections, not `53100`, and only order creation opens a new connection per request in `orders-api-00018`. The disk is not involved; this is a [connection budget](/learn/connection-limits/) problem the new revision introduced.

## Where the checks mislead

`database/disk/bytes_used` does not include the space the file system keeps for its own metadata, which on large disks is 1% to 3% of the total. Utilization can read a little lower than the space PostgreSQL can actually use, and automatic increases can start before the metric reaches the threshold. [Considerations for large disks](https://cloud.google.com/sql/docs/postgres/instance-settings)

A disk can cause trouble before it is full. PostgreSQL's documentation warns that some file systems perform badly when they are almost full, so slow writes in the last few percent are not proof of a code change. Look for `53100` in the PostgreSQL log, `cloudsql.googleapis.com/postgres.log`, before reading latency. [Disk full failure](https://www.postgresql.org/docs/current/diskusage.html) · [View Cloud SQL logs](https://cloud.google.com/sql/docs/postgres/logging)

Automatic increases are permanent; the provisioned size does not shrink by itself. A limit set to cap that cost is one reason a disk cannot grow during an incident. It is a setting someone chose, so read who set it in the Admin Activity audit log before changing it. [Automatic storage increases](https://cloud.google.com/sql/docs/postgres/instance-settings) · [Cloud SQL audit logging](https://cloud.google.com/sql/docs/postgres/audit-logging)

## Questions

### What happens when a Cloud SQL instance runs out of storage?

When it is nearly out of storage, Cloud SQL stops it to prevent the loss of information. If it runs out entirely, it goes offline and drops existing connections. Before that, statements that need new space can fail with SQLSTATE `53100` (`disk_full`).

### Why did automatic storage increase not prevent a full disk?

The setting may be off, the increase limit may equal the current size, or growth may have outrun the increases. Cloud SQL checks every 30 seconds and adds a fixed amount each time, and on Hyperdisk Balanced frequent increases within four hours can be throttled.

### Which metric shows Cloud SQL disk usage?

`database/disk/utilization` gives the fraction of the disk quota in use. `database/disk/bytes_used_by_data_type` shows whether data, WAL or temporary files are growing.

## 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

-   ### [Every Cloud Run connection fails: is the Cloud SQL instance stopped or suspended?](/learn/cloud-sql-instance-stopped-or-suspended/)
    
    Broken dependencies The Proofline team November 23, 2026 5 min read
    
-   ### [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
