RDS CPU at 100%
Performance Insights, slow query log, EXPLAIN, missing indexes, autovacuum, and connection storms.
Overview
Overview
RDS CPU at 100% slows every query proportionally and can eventually make the instance unresponsive. The root cause is almost always one of four things: an expensive query, a traffic spike, lock contention or autovacuum on bloated PostgreSQL tables. A fifth, the connection storm, shows up when many clients reconnect at the same moment.
The path from symptom to fix is short. Performance Insights shows the database load broken down by wait event. Its Top SQL tab names the offending query. EXPLAIN ANALYZE shows that query's execution plan. The fix follows from what the plan shows: an index, a fresh ANALYZE, autovacuum tuning or connection pooling.
Key concepts
- Performance Insights
- EXPLAIN ANALYZE
- pg_stat_statements
- Autovacuum
- RDS Proxy
Interview questions
- Your RDS CPU is at 100%. Walk through how you identify and fix the root cause.
Sign up free to read the full topic
More Troubleshooting topics
- NAT Gateway Bandwidth and Throttling
- Network Bandwidth Saturation
- OOMKilled Pod Diagnosis
- Packet Loss and Network Degradation
- Pods Stuck Pending
- PVC Mount Failures in Kubernetes
- RDS Read Replica Replication Lag
- S3 High Latency Spikes
- Slow Query Diagnosis
- Staging Passes, Prod Fails
- TLS Certificate Expiry Incidents
- VPC Connectivity Failures
Start free on Cariara · Coding problems · System design studio