Incidents

We fixed a disk outage by buying RAM

November 28, 2026

Early in my career, I watched search, inventory, and listings slow down together at a large company. The search cache had failed, and every search request was falling through to the small Postgres database that served inventory and listings.

A timeline of the incident. The search cache breaks. Latency climbs while database CPU stays near 20%. Read IOPS flatline and burst balance reads zero. Growing the disk fails, and storage changes lock for six hours. The instance moves to db.m4.2xlarge, the cache warms and the service recovers. About five hours later the disk moves to provisioned IOPS and the instance scales down. Search-side fixes and a read cache follow.

When search fell through

On a normal day, the search cache answered most requests. A cache-filler sent a steady trickle of queries to the inventory database, a Multi-AZ RDS db.t3.medium with 4 GB of RAM and a 20 GiB gp2 volume. The database could handle that. When the cache failed, there was no cap on what search could send downstream.

On a normal day, the search cache answers most search requests and only the cache-filler queries the inventory database. When the cache broke, every raw search request went straight to the inventory database.

The disk ran out of credits

Our APM showed slow queries while database CPU hovered around 20%. Within minutes, CloudWatch showed why. Read IOPS flattened, the disk queue grew, and burst balance hit zero. Queries were spending their time waiting for disk.

A gp2 volume gets 3 baseline IOPS per GiB, with a minimum of 100. Ours could burst to 3,000 IOPS on credits. Search burned through those credits, the disk dropped to 100 IOPS, and reads queued long enough for requests to time out. (AWS gp2 documentation)

An illustrative chart of read IOPS. The gp2 volume bursts to 3,000 IOPS until its credits run out, then drops to the 100 IOPS floor while queries pile up. Growing the disk holds 3,000 IOPS steady, but search still asks for more, and storage changes lock for six hours. After the instance upgrade, reads come from memory and the disk load falls.

We grew the disk to sustain 3,000 IOPS, and search saturated it again. That resize also locked us out of RDS storage changes for six hours. A failover would put the same traffic on a standby with the same storage limits.

The working set could fit in RAM

The working set was 5–6 GB. The instance had 4 GB of RAM, shared by Postgres and the operating system. Search touched pages across the inventory, so the two caches kept evicting pages that later queries had to fetch from disk.

RDS had locked storage changes. We could still change the instance class. I suggested moving to a db.m4.2xlarge with 32 GB of RAM. With room for the working set in Postgres’s buffer cache and the OS page cache, we could serve those reads from memory. (PostgreSQL cache documentation)

Drawn to scale: 5 to 6GB of data overflows the 4GB of memory on a db.t3.medium, so misses go to the disk. On a db.m4.2xlarge with 32GB, all of the data fits in memory.

RDS upgraded the standby and failed over in about two minutes. The new instance started cold. Search traffic warmed the cache in another four to five minutes, disk reads fell, and the service stabilized.

Back to steady state

Before the upgrade finished, we had agreed when to undo it. We ran the larger instance for about five hours. Once RDS let us modify storage again, we switched to provisioned IOPS and scaled the instance back down. (AWS Provisioned IOPS documentation)

The search team fixed its cache, and we added a read cache in front of the inventory service. The next search cache failure would have another layer between it and the database.

This feels more relevant to me now than it did five years ago. AI can sift through metrics, trace code, and propose fixes while an incident is unfolding. I’d still want someone on the call who can look at a saturated disk and think about what Postgres could keep in RAM, then decide what to change while customers are waiting. That’s why I keep learning how the systems I run behave under pressure.