2023-07-05: The rails_replica_sql SLI of the patroni service (main stage) has an apdex violating SLO
Customer Impact
Slight/unnoticeable: #15987 (comment 1467968145).
Current Status
Large dips in patroni-rails apdex value indicates slow database response on the replicas. The root cause is unknown, although we've seen similar investigated similar behavior in the recent past: scalability#2301 (closed).
This issue might have been exacerbated by the scaledown of the replica fleet in #14558 (closed), which is now fully reverted following the scale up in #16029 (closed).
Follow up investigation issue
Incident characteristics
- Alert for the rails_replica_sql SLI, somtimes accompanied by Patroni Apdex dips.
- Patroni's saturation graphs showing increase in
pg_active_db_connections_replica
. - The
lock-manager
lwlocks
are made worse during peak hours, including scheduled deployments. - The performance dips for one replica at a time.
- Known slow queries would standout in the
pg_stat_statements_seconds_total
Thanos query. - Known slow endpoint would standout in Kibana's Postgres logs.
📚 References and helpful links
Recent Events (available internally only):
- Feature Flag Log - Chatops to toggle Feature Flags Documentation
- Infrastructure Configurations
- GCP Events (e.g. host failure)
Deployment Guidance
- Deployments Log | Gitlab.com Latest Updates
- Reach out to Release Managers for S1/S2 incidents to discuss Rollbacks, Hot Patching or speeding up deployments. | Rollback Runbook | Hot Patch Runbook
Use the following links to create related issues to this incident if additional work needs to be completed after it is resolved:
- Corrective action ❙ Infradev
- Incident Review ❙ Infra investigation followup
- Confidential Support contact ❙ QA investigation
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.