- Newest
- Most votes
- Most comments
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
There are several potential reasons why your Aurora Serverless v2 PostgreSQL database might be resuming despite no apparent user activity:
-
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.
-
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.
-
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.
-
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.
-
Scheduled jobs or internal processes: PostgreSQL may have engine-specific scheduled jobs or internal processes that periodically activate, causing the instance to resume.
-
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:
- Check your database logs more thoroughly for any patterns or recurring events coinciding with the resume times.
- Review your DB parameter group settings for any configurations that might be triggering periodic activities.
- Examine any applications or tools that might be configured to connect to your database automatically.
- 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
Relevant content
asked a year ago
asked 2 years ago
- AWS OFFICIALUpdated 7 months ago
