Runbook: RDSSwapUtilization Alert

Alert Details

  • Alert Name: RDSSwapUtilization
  • Expression: rds_swap_usage_bytes / 1024 / 1024 > 50

Description

Alert is triggered when RDS move data on its swap.

Possible Causes

  • high load

Troubleshooting Steps

1. Check memory usage over last weeks to identify if server is missing memory

2. Check if there long running PostgreSQL clients that don’t execute SQL queries for a while on live dashboard

SELECT pid, usename, datname, application_name, age(now(), query_start) as last_query_age, age(now(), backend_start) as backend_age, backend_start, query_start last_query, left(query, 60) query FROM pg_stat_activity WHERE query_start is not null AND pid != pg_backend_pid() AND usename != 'rdsrepladmin' AND state != 'active' AND query not like 'START_REPLICATION %' AND query_start < NOW() - INTERVAL '24 HOURS' ORDER by query_start asc;

3. Reduce number of concurrent connections on the server

4. Increase RDS instance type to have more memory