2021-09-07: Postgres transactions showing high rate of statement timeouts
Current Status
We experienced an increase in latency for all GitLab front-end services as well as delays in job processing for approximately 30 minutes . This mostly impacted Web and API.
The cause was a long running transaction on the webhooks table that resulted in database timeouts, because so many transactions involve webhooks this problem had a large blast radius. Due to the build-up of jobs we saw additional delays in job processing for an additional ~40minutes.
Summary for CMOC notice / Exec summary:
- Customer Impact: Web, API front-end and actions that result in webhooks
- Customer Impact Duration: 09:48 - 10:16 (30 minutes). There was a slow recovery of queued jobs until 11:25
- Current state: See
Incident::<state>label - Root cause: Database
Timeline
View recent production deployment and configuration events / gcp events (internal only)
All times UTC.
2021-09-07
-
08:41: canary migration start (no changes) -
09:01: canary fleet upgrade starts -
09:14: canary fleet upgrade ends -
09:48: Patroni apdex drops -
09:54: ahmad declares incident in Slack. -
10:16:pg_txid_xmin_agedrops indicating resulting in recovery -
11:18: We have marked this as IncidentMitigated as we continue to work down the job queues post recovery. -
11:25: Full recovery
Corrective Actions
Corrective actions should be put here as soon as an incident is mitigated, ensure that all corrective actions mentioned in the notes below are included.
- Understand Mutixact Offset LWLock database contention gitlab-org/gitlab#340272 (closed)
Note: In some cases we need to redact information from public view. We only do this in a limited number of documented cases. This might include the summary, timeline or any other bits of information, laid out in out handbook page. Any of this confidential data will be in a linked issue, only visible internally. By default, all information we can share, will be public, in accordance to our transparency value.
Click to expand or collapse the Incident Review section.
Incident Review
-
Ensure that the exec summary is completed at the top of the incident issue, the timeline is updated and relevant graphs are included in the summary -
If there are any corrective action items mentioned in the notes on the incident, ensure they are listed in the "Corrective Action" section -
Fill out relevant sections below or link to the meeting review notes that cover these topics
Customer Impact
-
Who was impacted by this incident? (i.e. external customers, internal customers)
- Both external and internal customers
-
What was the customer experience during the incident? (i.e. preventing them from doing X, incorrect display of Y, ...)
- Slow response times, delays in job processing
-
How many customers were affected?
- All customers using the front-end were affected
-
If a precise customer impact number is unknown, what is the estimated impact (number and ratio of failed requests, amount of traffic drop, ...)?
- ...
What were the root causes?
- ...
Incident Response Analysis
-
How was the incident detected?
- ...
-
How could detection time be improved?
- ...
-
How was the root cause diagnosed?
- ...
-
How could time to diagnosis be improved?
- ...
-
How did we reach the point where we knew how to mitigate the impact?
- ...
-
How could time to mitigation be improved?
- ...
-
What went well?
- ...
Post Incident Analysis
-
Did we have other events in the past with the same root cause?
- ...
-
Do we have existing backlog items that would've prevented or greatly reduced the impact of this incident?
- ...
-
Was this incident triggered by a change (deployment of code or change to infrastructure)? If yes, link the issue.
- ...
Lessons Learned
- ...
Guidelines
Resources
- If the Situation Zoom room was utilised, recording will be automatically uploaded to Incident room Google Drive folder (private)