Skip to content

Aurora Serverless v2 resumes without user activity

0

I have configured my Aurora Serverless v2 PostgreSQL (16.4) database to pause after 5 minutes of inactivity. This works as expected. However, the database resumes multiple times during the day with a message indicating user activity despite there being no activity. The database is purely for development purposes and only used by me in spare time, so I would like to keep it paused when I'm not using it.

You can see a screenshot of what the Logs & events typically looks like during a day when there should have been no activity. It pauses again 5 minutes after resuming. What could be causing it to keep resuming?

Logs & events

asked a year ago755 views

3 Answers
0

Do you have an RDS Proxy setup? That too can cause this.

EXPERT

answered a year ago

0

In my case such behaviour was caused by monitoring if DB port is open. Please remember, that with Serverless Pause enabled just checking if the port is open with tools like:

$ nc -z -v -w 3 auradb.eu-west-1.rds.amazonaws.com 5432
$ telnet auradb.eu-west-1.rds.amazonaws.com 5432

will cause the DB to resume from sleep. That is not even connecting to the DB, just checking the port is enough to trigger a resume. Such activity is not reported by database (maybe checking logging traces can help here) and CloudWatch monitoring can show no Database Connections.

answered a year ago

-1

There are several potential reasons why your Aurora Serverless v2 PostgreSQL database might be resuming despite no apparent user activity:

  1. Replication: If your database has engine-specific replication enabled (such as logical replication for PostgreSQL), this can prevent the instance from pausing or cause it to resume.

  2. Continuous backup processes: If the Aurora storage system is still applying storage changes to catch up to the current point in time, this can keep the writer instance from pausing or cause it to resume.

  3. Maintenance actions: Various maintenance operations, either initiated by you or by Aurora itself, can prevent pausing or trigger resuming. These could include upgrades, configuration changes, log file downloads, or other background tasks.

  4. Transient communication issues: In rare cases, if Aurora can't determine the current minimum capacity setting, it may not pause the instance or may resume it.

  5. Scheduled jobs or internal processes: PostgreSQL may have engine-specific scheduled jobs or internal processes that periodically activate, causing the instance to resume.

  6. Client connection attempts: Even if you're not actively using the database, there might be automated processes, applications, or monitoring tools attempting to connect periodically.

To troubleshoot this issue:

  1. Check your database logs more thoroughly for any patterns or recurring events coinciding with the resume times.
  2. Review your DB parameter group settings for any configurations that might be triggering periodic activities.
  3. Examine any applications or tools that might be configured to connect to your database automatically.
  4. Consider setting up more detailed CloudWatch alarms to capture any subtle patterns in resource utilization or connection attempts just before the resumes.

If you're unable to identify the cause through these methods, it would be advisable to open a support case with AWS. They have access to more detailed system logs and may be able to provide insight into any internal processes or issues causing these unexpected resumes.

Remember that while the auto-pause feature can help reduce costs, it's designed with a balance between cost savings and quick availability. For a development environment, you might also consider stopping the instance manually when not in use for extended periods, although this would result in longer startup times when you need to use it again.

Sources
Managing Aurora Serverless v2 DB clusters - Amazon Aurora
Introducing scaling to 0 capacity with Amazon Aurora Serverless v2 | AWS Database Blog
AWS RDS PostgreSQL Restarts Intermittently (2-3 Times a Day) – No Maintenance or Failover | AWS re:Post

answered a year ago

EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.