IL-0291 GitLab · 2023-01-05 (published)databasegcp
GitLab.com's redis-sidekiq Sentinel could not elect a primary after a GCP host error, so Sidekiq was down for 30 minutes
In GitLab.com's redis-sidekiq Redis, managed by Redis Sentinel, the node redis-sidekiq-01-db-gprd had been down for more than 30 days, so the cluster had been running with a quorum of 2. An alert that would have shown a down node had been added in the runbooks and later removed for being too noisy. When the primary, redis-sidekiq-03-db-gprd, failed on a GCP host error and its VM was reset and moved to another node, no quorum was possible. The services on the nodes do not start automatically on boot, so the cluster was left with one replica stuck on a quorum conflict.
Once responders saw there were not enough machines to elect a primary, they restarted the failed node. Redis was out for about 30 minutes. The best estimate of affected customers is 16,621, and the review says the real number may have been much larger. About 4,000 merge requests stayed unusable for several hours, which made up the long tail of the recovery.
- Severity
- –
- Scope
- All services using Sidekiq jobs on GitLab.com fully down for 30 minutes, with knock-on errors in Web and API requests and SAML login; about 4,000 merge requests unusable for several hours
- Users affected
- External customers; best estimate 16,621, possibly much more
- Region
- –
- Time to detect
- –
- Time to resolve
- –
Symptoms
GitLab.com showed widespread, erratic behaviour and more 500 errors for about 30 minutes while its redis-sidekiq Redis was down. Alerts in the #production channel began with Redis client errors and spread to error SLO violations on several services, such as the Webservice and API load balancer and Puma.
Every service that uses Sidekiq jobs was fully down for those 30 minutes, with knock-on effects on Web and API requests; among other things, users could not log in with SAML. For about 4,000 merge requests created during the outage, diffs, pipeline status and merging stayed unavailable for several hours afterwards, because merge requests could not recover by themselves from a Redis Sidekiq outage.
Symptom Failover failureHigh error rate
Root cause
Root cause Cloud provider outage
- Trigger
- The VM of the primary node, redis-sidekiq-03-db-gprd, failed on a GCP host error and was reset and moved to another node.
Detection
Several alerts in the #production channel, first Redis client errors and then error SLO violations on several services, such as the Webservice and API load balancer and Puma.
Remediation
- Restarted the failed Redis node so Sentinel had enough nodes to elect a primary
Action items
- Alert when the Sentinel service is down
- Make merge requests robust to Redis Sidekiq outages
Lessons
An alert on a down Sentinel node would have kept enough nodes up to form a quorum when failover was needed, and could have avoided the incident entirely. Removing a noisy alert earlier may have let the down node go unnoticed.
Sources
References
- https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/17063
- https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/17075
- https://gitlab.com/gitlab-org/gitlab/-/issues/387176
- https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/9431
- https://gitlab.com/gitlab-com/runbooks/-/merge_requests/2040
Related cases
–
Check your cluster for this
For AI tools and scripts
- This case as JSON: https://incidentlib-api.benchlet.com/cases/IL-0291
- The cases most like it: https://incidentlib-api.benchlet.com/cases/IL-0291/similar
- MCP server (Streamable HTTP, no key):
https://incidentlib-mcp.benchlet.com/mcp
The API needs no key. The MCP server offers search_incidents, get_incident, list_incidents, get_topic and vocab; both are explained on API and MCP.