Runbook: RDSMemoryUtilization Alert

Alert Details

  • Alert Name: RDSMemoryUtilization
  • Expression: ((rds_freeable_memory_bytes{dbidentifier!~".*copy.*"}) / on(dbidentifier) (group by (dbidentifier,instance_class) (rds_instance_info{dbidentifier!~".*copy.*"}) * on(instance_class) group_right(dbidentifier) max by (instance_class, job, cluster) (rds_instance_memory_bytes)) * -100 ) + 100 >

Description

Alert is triggered when an RDS instance has low available memory.

Possible Causes

  • systemload

Troubleshooting Steps

1. Check the number of database connections

2. Reduce memory usage

  1. Reduce the maximum number of connections

Update the max_connections RDS parameter to reduce maximum number of clients

  1. Limit database connections per user

You can also reduce the maximum number of connections per PostgreSQL user using ALTER ROLE <user_to_limit> CONNECTION LIMIT <max_connection_limit_for_role>;

  1. Reduce the work_mem

3. Increase server instance type

Warning: Modifying an AWS instance generates downtime:

  • Multi-AZ enabled: Instance failover will be triggered (< 1 minute downtime)
  • No multi-az: Instance will restarted with new hardware (~15 minutes downtime)