Skip to content

How do I troubleshoot performance and connectivity issues with my Aurora PostgreSQL-Compatible read replicas?

3 minute read
0

I want to troubleshoot replica lag, connection issues, or failovers with my Amazon Aurora PostgreSQL-Compatible Edition read replicas.

Resolution

Identify and resolve replication lag

Replication lag occurs when there's a delay between write operations on the primary instance. Although Aurora PostgreSQL-Compatible instances in a database (DB) cluster share a storage volume with minimal replica lag, lag can still occur.

To monitor replica lag, see Monitoring Aurora PostgreSQL replication.

Manage idle connections

A significant number of idle database connections can cause performance issues and resource exhaustion.

To resolve these issues, identify and troubleshoot your slow-running queries.

Resolve failover-related configuration issues

Aurora’s PostgreSQL-Compatible automatic failover mechanism prioritizes high availability and might not maintain specific instance configurations. After a failover event, reader and writer instances might swap instance classes.

To check for failover events, complete the following steps:

  1. Open the Amazon Relational Database Service (Amazon RDS) console.
  2. In the navigation pane, choose Clusters, and then select your Aurora cluster.
  3. Choose Logs & events.
  4. Review the logs for recent failover events.

Identify the current primary instance in the Amazon RDS console to check whether the instance swapped instance classes and is now the writer instance. 

To restore the configuration, you must manually initiate a failover.

Complete the following steps:

  1. Open the Amazon RDS console.
  2. In the navigation pane, choose Clusters, and then select your Aurora cluster.
  3. Choose Actions, and then choose Failover.
  4. Select an instance to become the new primary.
  5. Change the writer instance to the larger instance class and the reader instance to the smaller instance class.

To prevent configuration issues after future failovers, take one or more of the following actions:

For an another failover solution, see How a large financial AWS customer implemented high availability and fast disaster recovery for Amazon Aurora PostgreSQL using Global Database and Amazon RDS Proxy.

Use the Aurora PostgreSQL read availability feature

Use the Aurora PostgreSQL-Compatible read availability feature to improve read availability when writer instance issues occur. The feature is available by default on Aurora PostgreSQL versions 16.1+, 15.2+, 14.7+, 13.10+, and 12.14+.

For more information, see Improving the read availability of Aurora Replicas.

Related information

Best practices with Amazon Aurora PostgreSQL

High availability for Amazon Aurora

Tuning with wait events for Aurora PostgreSQL

Monitoring DB load with Performance Insights on Amazon RDS

AWS OFFICIALUpdated 15 days ago