download

API 5xx errors jump to 18%. What do you check first?

DevOps~10 minReviewed 2 Dec 2026Free · No sign-in

Question

At 14:15 UTC, checkout-api pages on high 5xx errors. Release v2.14.0 finished deploying at 14:10 UTC. You open the Four Golden Signals dashboard:

Signal14:00 (baseline)14:15 (now)
Traffic (req/s)1,0001,050
5xx error rate0.1% (1/s)18.0% (189/s)
p99 latency (2xx)120 ms132 ms
p99 latency (5xx)40 ms5,000 ms
DB pool in use18 / 50 (36%)50 / 50 (100%)
API pod CPU28%31%
  1. What do these four signals rule out, and what bottleneck do they point to?
  2. What do you do first: hunt for the exact SQL bug, or mitigate?
Show hints (3)
  1. "CHECK TRAFFIC AND CPU"

    Traffic grew only 5% and CPU barely moved (+3 points). Does this look like a DDoS spike or a CPU bottleneck?

  2. "READ 5XX LATENCY"

    Failed requests jumped from 40 ms to 5,000 ms while the DB pool hit 50/50 (100%). Requests are waiting on a 5-second pool timeout.

  3. "MITIGATE BEFORE DEBUGGING"

    The spike started 5 minutes after v2.14.0 shipped. Stop user pain first, then keep logs and query snapshots for root-cause analysis.

Show checked explanation

Traffic (+5%) and CPU (31%) rule out a load spike or compute exhaustion. A 100% full DB pool (50/50) plus 5,000 ms 5xx latency (125x baseline) points to connection exhaustion right after v2.14.0 deployed at 14:10 UTC. Confirm blast radius, grab quick evidence, and roll back v2.14.0 to stop user errors before hunting for the root cause.

Dashboard ratios, error counts, pool usage, and latency multipliers were checked on CPython 3.12.10 against Google SRE monitoring and troubleshooting guidance. Checked by an editor other than the author.

Walkthrough

Read the Four Golden Signals (latency, traffic, errors, saturation) together before opening random logs. Each row narrows the search space fast:

  • Traffic: 1,000 to 1,050 req/s (+5%). Normal variation, not a traffic surge.
  • Errors: 0.1% (1/s) to 18.0% (189/s). The error rate jumped 180x (and failed requests rose 189x).
  • Latency: Successful 2xx p99 rose only 10% (120 ms to 132 ms), while 5xx p99 jumped 125x (40 ms to 5,000 ms). Splitting 2xx and 5xx latency exposes a classic slow error: requests sit queued until a 5-second timeout fires.
  • Saturation: DB pool usage hit 50/50 (100%, up from 36%) while API CPU stayed flat at 31%. Pods are idle waiting on database connections.

Next, compare against the change timeline. Release v2.14.0 landed 5 minutes before the alert (14:10 to 14:15 UTC). Common causes in a new release are a leaked connection, a missing index holding transactions open, or an external HTTP call moved inside a DB transaction.

Follow a strict triage order so you stop user pain fast:

StepGoalConcrete action
1. Scope blast radiusIsolate what failsSlice 5xx by route, status (500 vs 503/504), pod version, and region
2. Capture evidencePreserve state before rollbackSnapshot error logs, active DB queries (pg_stat_activity), and pool metrics
3. Mitigate firstRestore service healthRoll back v2.14.0 (or toggle its feature flag) and watch 5xx drop
4. Find root causePrevent recurrenceDiff v2.14.0, reproduce the pool leak or slow query in staging, write a postmortem

If rolling back v2.14.0 does not clear the 50/50 DB pool within minutes, pivot to the database itself. Check lock waits, replication lag, disk saturation, and other services sharing that PostgreSQL cluster.

Common mistakes

  • Spending 40 minutes reading stack traces while 189 users fail every second. Mitigate first via rollback or traffic shift, then debug calmly.
  • Scaling API pods from 10 to 30 during DB pool exhaustion. Tripling pods triples connection demand (1,500 connections) and can crash PostgreSQL completely.
  • Charting only combined average latency. Mixing 2xx and 5xx hides whether errors fail fast (40 ms) or stall on timeouts (5,000 ms).
  • Rolling back without saving evidence first. Grabbing one snapshot of active queries and error logs takes 30 seconds and saves hours later.

Follow-up questions

  • "What if 5xx latency stayed at 40 ms instead of jumping to 5,000 ms?" Fast 40 ms errors mean requests fail right away without queuing. Check immediate crashes (nil pointer, missing config key, bad deploy artifact), broken auth tokens, or a circuit breaker already open.
  • "Why would you check other services sharing the same database before blaming v2.14.0 alone?" A noisy neighbor running a heavy batch job or table lock on the same PostgreSQL instance can also fill checkout-api's 50-connection pool. Checking shared DB metrics rules out an external trigger.
  • "When should you NOT immediately roll back the latest deploy?" Pause rollback if v2.14.0 included a non-backward-compatible schema drop or if errors started before 14:10 UTC. In those cases, rolling back breaks older pods or fails to remove the real cause.

What a strong answer covers

Uses all four Golden Signals to rule out traffic and CPU, then pinpoints DB pool exhaustion from 50/50 saturation and 5,000 ms timeouts. Prioritizes blast-radius scope, an evidence snapshot, and rolling back v2.14.0 before deep debugging.

Open in interactive practice deck →

Original OfferVibe question. Monitoring Distributed Systems · Effective Troubleshooting · Managing Incidents.
© 2026 OfferVibe · Text CC BY-NC-SA 4.0 · code MITFree to share and adapt with credit, not for commercial use. Code samples are free for any use.