Cases3 cases
1 to 3 of 3
IL-0572About 10 million Pub/Sub messages backed up and Merpay accounting data was not written to Cloud Spanner for over a dayMercari2026- Symptoms
From about 6:00 on the last business day of a month, Cloud Pub/Sub messages of the Merpay accounting event pipeline began to back up, new accounting data stopped being registered in Cloud Spanner, and the accounting system intermittently could not accept new data. The backlog grew to about 10 million messages.
- Trigger
More than a month earlier the Cloud Functions of the pipeline had been moved from 1st gen to 2nd gen (based on Cloud Run) without setting --max-instances in the deploy command, which lowered the scale limit from effectively unlimited, the 1st gen default, to 100, the 2nd gen default. The month-end peak, which on that day continued for about 40 minutes, reached that limit.
- Root cause
- Component
- Contributing factor
- Remediation
- Re-ingested the messages saved to GCS by the Dataflow subscription, avoiding data loss
- Action items
- Set max-instances and the other scaling parameters of Cloud Run explicitly in the deploy definition, raising max-instances from 100 to 1000 in steps
- Set min-instances to 1 to avoid cold starts, raise concurrency from 1 to 10, and set CPU to 1 and memory from 512MB to 1Gi
- Use the dual CPU scaling mode of spanner-autoscaler v0.8.0 with a new Total CPU threshold of 70%
- Lower the High priority CPU threshold from 60% to 55% so scale-up starts earlier
- Forbid Spanner scale-down between 5:00 and 7:00
- Reserve Spanner processing units on a schedule for periods with predictable load
- Alert in Datadog when the Cloud Run instance count reaches 40% and 60% of its limit
- Alert in Datadog when undelivered Pub/Sub messages exceed a threshold, lowering it step by step
- Lessons
When moving to a new generation of a managed service, defaults that the team never changed can surface as problems under load, so parameters that only matter at peak, such as scale limits, concurrency and timeouts, should be set explicitly at every migration. An outage rarely has one cause; the fact that the previous month passed under the same conditions pointed to traffic continuity, and prevention needs to look at the trigger, the amplification and what turned it into damage. Capacity settings and the monitoring that shows when they are approached have to be designed together, and teams that run systems they inherited should review these settings and assumptions regularly.
IL-0571STORES reservation returned bursts of 504 errors when a smart-list query held a database process for over 20 minutesSTORES2024- Symptoms
About 20 minutes into a batch that rewrote the preset smart-list data of STORES 予約 (STORES reservation), an alert fired for a sudden rise in 504 errors (Gateway Timeout). The work had started a little after 03:00 UTC, and the metrics watched during it, such as web server response latency and the load of the writer database, had shown no large change.
- Trigger
The preset smart lists 初回予約の顧客 (first-reservation customers) and 要フォロー顧客 (customers needing follow-up), created more than a month earlier, were rewritten with new search parameters after the search specification changed, which switched them onto the new search query.
- Root cause
- Component
- Contributing factor
- Detection
An alert on a sudden increase in 504 errors (Gateway Timeout), about 20 minutes after the preset rewrite batch started.
- Action items
- Rework the database design so the inline-view search logic is no longer used
- Add a test that checks this API's EXPLAIN output for scans larger than expected
- Provide an environment where the timing of this logic can be measured easily
- Lessons
Rushing to meet the schedule led to both a failure that affected users and a later release. In a multi-tenant database an EXPLAIN that shows index use can still hide large scans, tests need the case where one query is fast and the next is slow, the metrics to watch during a data change are those of the instance that serves the affected queries, and metrics sent at the end of a request are lost for requests that never finish.
IL-0294CircleCI Docker and machine jobs stalled for nearly 12 hours after a VM cleanup queue lost all its RabbitMQ consumersCircleCI2021- Symptoms
From 13:30 UTC on 21 May 2021, CircleCI jobs on Docker, the Machine executor (including Windows, Mac, Arm and GPU) and remote Docker were delayed or blocked. Engineers had been paged at 13:00 for excessive delays in starting jobs, and the alerts showed CircleCI could not provision some types and classes of VM because it was hitting its CPU quotas in GCP.
- Trigger
The upgrade of the RabbitMQ cluster from 3.8.9 to 3.8.16 on 20 May 2021, which brought in a 15 minute consumer acknowledgement timeout for all queue types.
- Root cause
- Component
- Contributing factor
- Detection
Engineers were paged at 13:00 UTC on 21 May for excessive delays in starting jobs. Earlier, a 02:31 notification that a VM destroyer queue had no consumers was handled by restarting pods, and a 10:11 alert that a VM destroy queue was backing up notified once at its threshold and did not page.
- Remediation
- Blocked Linux machine jobs from entering the work queue
- Had GCP raise the CPU quotas
- Deleted old VMs by hand
- Cancelled some workflows to free resources
- Reset the VM services deployment so the VM destroy queues had consumers again
- Scaled up the RDS database instance, at 18:20 and again at 19:15
- Turned down VM provisioning and blocked remote-docker jobs to shed load
- Scaled down all pods that created and destroyed VMs
- Deployed a revised distribution backend that kept remote-docker jobs out of the provisioning queues
- Brought provisioning and distribution back one component at a time and reversed the mitigation code changes
- Action items
- Make VM provisioning more robust to changes in load so it can recover from thundering herds
- Make VM provisioning independent so its failure does not affect Docker jobs
- Review and improve observability of RabbitMQ and the production queues
- Batch requests to avoid hitting GCP API rate limits
- Improve incident response for long-running incidents
These 3 cases involve Database and Message broker. kubegap audits a Kubernetes cluster for gaps like these, read-only, from Claude Code or Codex; its checks cite public reports like the ones in this library.
By root cause2
Breaking change in an upgrade2 cases
- Contributing factor
Faulty deployment1 case
- Component
- Contributing factor
- Organisation