Graph
Cases3 cases
1 to 3 of 3
IL-0024Expensive cache-backed API calls and uncancelled database requests overloaded MongoDB and took the Hugging Face Hub down three timesHugging Face2024- Symptoms
At 08:45 CET on 22 April 2024 the Hugging Face Hub became unstable, and by 09:30 it was unresponsive. For most users the website was slow or could not be reached at all.
- Trigger
Bursts of requests to revision endpoints that read heavily from the *_info_cache collections: a call to https://huggingface.co/api/datasets/lighteval/mmlu/revision/main rose sharply right before the first crash, and a call to https://huggingface.co/api/models/sentence-transformers/all-mpnet-base-v2/revision/main, a model with 300+ associated spaces, lined up with the crash at 21:30 on 23 April.
- Root cause
- Component
- Contributing factor
- Detection
Instability started at 08:45 on 22 April and the Hub was unresponsive by 09:30; the team followed MongoDB Atlas metrics and a MongoDB support case. The root cause was found days later from a new graph of requests per URL.
- Remediation
- Added a firewall rule blocking all requests with a Java/* user agent
- Disabled the quicksearch feature on the Hub
- Scaled the MongoDB Atlas cluster by hand from tier 2 to tier 3
- Switched the Hub to maintenance mode with a 503 page through AWS WAF and blocked incoming traffic
- Scaled all Hub pods down to 0 and brought them back
- Set an aggressive rate limit
- Added timeouts to requests and reworked database queries that were slow or returned large bodies
- Action items
- Add timeouts to requests based on their usual completion time
- Optimise requests that took too long or returned a large body, and rework poorly designed database queries
- Remove old unused indexes from the database
- Build new dashboards and monitoring metrics
- Move the *_info_cache collections to Redis
- Make it possible to abort any database request when the client aborts theirs
- Lessons
Finding the root cause took two to three days: the existing charts did not show it, and a per-URL request breakdown did. Not cancelling database work when a client goes away turns a strained database into a thundering herd. A close inspection of the database exposed architectural flaws and bottlenecks, such as a collection with large unused indexes, and taught the team which metrics need closer watching to anticipate crashes. Unrelated failures happening at the same time added to the stress and made restoring service harder.
IL-0205The GKE cluster autoscaler could not add nodes to GitLab.com's production cluster because Google Cloud ran out of SSD persistent disks in us-east1GitLab2021- Symptoms
At 08:05 UTC on 2021-06-21 the API service's Apdex (the share of requests that finish within a target time) and Rails request queuing began trending the wrong way. At 09:01 the team found the API deployment unhealthy: it needed more pods for the day's growing traffic, but no new nodes could be added to give it pod capacity. Users saw slow responses; the review found no sign that error rates rose.
- Trigger
Google Cloud ran out of SSD persistent disk stock in us-east1, the region GitLab.com runs in, while the API service needed more nodes for rising user traffic.
- Root cause
- Component
- Contributing factor
- Detection
There was no alert on resource availability. Apdex and Rails queuing began trending the wrong way at 08:05 UTC and an engineer declared the incident in Slack at 08:43; finding the cause took a lot of log digging: cluster autoscaler errors about node pools in backoff, then ZONE_RESOURCE_POOL_EXHAUSTED at the instance-group level, and finally Google Cloud support naming SSD as the exhausted resource.
- Remediation
- added a node pool that uses pd-standard disks
- scaled the new node pool by hand across all three zones to relieve the API
- brought more pd-standard node pools online for the other blocked workloads
- stopped production deployments and opened a Google Cloud support case about the cluster autoscaler not working with the new node pools
- changed node pools and nodeSelectors so the remaining workloads ran on pd-standard nodes
- removed the SSD-backed node pools after a day without problems
- Action items
- Move Kubernetes services to pd-standard disks (delivery#1837)
- Capture resource exhaustion errors as a metric
- Lessons
A cloud region can run out of one specific resource, here SSD persistent disks, and the only error may be a generic ZONE_RESOURCE_POOL_EXHAUSTED that does not name it. GitLab could neither monitor nor reserve resource availability, so detection took 22 hours and the cause came from Google Cloud support. The workloads ran fine on pd-standard disks. A second problem found on the way, a cluster autoscaler that does not fall back to another matching node pool when one cannot scale, slowed the move to the new node pools.
IL-0014A GKE upgrade to a withdrawn version stalled on slow drains and a stuck node pool, then broke an ingress and confused the HPAloveholidays2019- Symptoms
On the evening of a long-overdue upgrade of a loveholidays production GKE cluster from 1.10.X to 1.12.5-gke.10, planned to take 2 to 2.5 hours, the master upgrade and the first two 7-node NodePools went smoothly. After that the NodePool upgrades slowed to a crawl. Each node is cordoned, drained and upgraded in turn. Even a 14-node cluster at about 5 minutes per node took over an hour, and with about 100 more nodes to go, some of them taking over 15 minutes to drain, the sequential drains were too slow to finish at a reasonable hour.
- Trigger
A manual upgrade of the GKE masters and NodePools from 1.10.X to 1.12.5-gke.10, two versions at once, on 19 March 2019; GKE's release notes of 14 March had already said that version was no longer available for new clusters or master upgrades because masters showed elevated error rates, but it could still be selected.
- Root cause
- Component
- Contributing factor
- Detection
The slow drains, zombie nodes and stuck NodePool were seen by the engineer running the upgrade; the broken Ingress was noticed after the upgrade and explained by Google support; the HPA problem was noticed the next day.
- Remediation
- drained the remaining NodePool nodes ahead of the upgrade with kubectl drain --ignore-daemonsets --delete-local-data
- deleted the zombie instances from the managed instance group with gcloud compute instance-groups managed delete-instances
- cancelled the stuck UPGRADE_NODES operation with gcloud beta container operations cancel
- used kubectl port-forward in place of the broken internal Ingresses
- scaled down the older of two active ReplicaSets, or triggered a dummy deployment, to bring the HPA back
- Action items
- Alert when a HorizontalPodAutoscaler is at 70% and at 100% of its capacity
- Alert when a deployment has had two active ReplicaSets for 30 minutes and for 60 minutes
- Re-evaluate termination grace periods that were set to arbitrary large values
- Read the GKE release notes before every cluster upgrade
- Use auto-upgrade in non-production environments, and manual cluster upgrades with automatic node upgrades in production
- Keep environments as identical as possible, including resource names
- Lessons
Read the release notes before upgrading: the target version had been withdrawn five days earlier. Drain time depends on pod configuration, so emptyDir volumes, long grace periods and missing disruption budgets turn a NodePool upgrade into hours. Pre-production only catches problems like the ingress bug if it matches production down to resource names. Auto-upgrades in non-production surface problems early, and a mix of manual cluster upgrades and automatic node upgrades in production keeps clusters current without much effort.
These 3 cases involve Cluster autoscaler and Node pool. 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
Software defect1 case
- Contributing factor
- Organisation
Cloud provider outage2 cases
- Component
- Contributing factor
- Organisation
IL-0205The GKE cluster autoscaler could not add nodes to GitLab.com's production cluster because Google Cloud ran out of SSD persistent disks in us-east1GitLab2021IL-0014A GKE upgrade to a withdrawn version stalled on slow drains and a stuck node pool, then broke an ingress and confused the HPAloveholidays2019