RCA: 2019-10-23: Short outage of gitlab.com
Incident: production#1272 (closed)
Summary
We had 2 short outages of gitlab.com related to issues with our redis cluster being caused by elevated memory usage.
- Service(s) affected : ~"Service:Web"
- Team attribution :
- Minutes downtime or degradation : 14m
For calculating duration of event, use the Platform Metrics Dashboard to look at appdex and SLO violations.
Impact & Metrics
Start with the following:
- What was the impact of the incident?
- all services depending on Redis didn't work during the outage, which was affecting most services.
- Who was impacted by this incident?
- all users
- How did the incident impact customers?
- 500 errors on gitlab.com
- How many attempts were made to access the impacted service/feature?
- How many customers were affected?
- How many customers tried to access the impacted service/feature?
Include any additional metrics that are of relevance.
Provide any relevant graphs that could help understand the impact of the incident and its dynamics.
Detection & Response
Start with the following:
- How was the incident detected?
- pingdom alerts and immediate reports from users
- Did alarming work as expected?
- yes
- How long did it take from the start of the incident to its detection?
- How long did it take from detection to remediation?
- Were there any issues with the response to the incident? (i.e. bastion host used to access the service was not available, relevant team memeber wasn't page-able, ...)
Root Cause Analysis
The purpose of this document is to understand the reasons that caused an incident, and to create mechanisms to prevent it from recurring in the future. A root cause can never be a person, the way of writing has to refer to the system and the context rather than the specific actors.
Follow the "5 whys" in a blameless manner as the core of the root-cause analysis.
For this it is necessary to start with the incident, and question why it happened. Keep iterating asking "why?" 5 times. While it's not a hard rule that it has to be 5 times, it helps to keep questions get deeper in finding the actual root cause.
Keep in min that from one "why?" there may come more than one answer, consider following the different branches.
Example of the usage of "5 whys"
The vehicle will not start. (the problem)
- Why? - The battery is dead.
- Why? - The alternator is not functioning.
- Why? - The alternator belt has broken.
- Why? - The alternator belt was well beyond its useful service life and not replaced.
- Why? - The vehicle was not maintained according to the recommended service schedule. (Fifth why, a root cause)
What went well
Start with the following:
- Identify the things that worked well or as expected.
- Any additional call-outs for what went particularly well.
What can be improved
Start with the following:
- Using the root cause analysis, explain what can be improved to prevent this from happening again.
- Is there anything that could have been done to improve the detection or time to detection?
- Is there anything that could have been done to improve the response or time to response?
- Is there an existing issue that would have either prevented this incident or reduced the impact?
- Did we have any indication or beforehand knowledge that this incident might take place?
Corrective actions
- annotations for feature flags delivery#525 (closed)
- metrics for oom events https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/8250
- make sure we have proper memory saturation alerts for redis
- research why we didn't fail over to redis-02
- fix sending redis logs to elastic: https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/8252
- Upgrading to Redis 4 or higher would allow us to have used the
MEMORY PURGEoption to deallocate memory, but this is not available to us since we're still on Redis 3.2 gitlab-org/omnibus-gitlab#3785 (closed) - Add Redis memory fragmentation alerts gitlab-com/runbooks!1547 (closed)
- Add specialised Redis memory saturation metric gitlab-com/runbooks!1548 (merged)