Skip to content

Lightsail RDS Instance - Restarted on its own

0

I had stopped my LightSail RDS Instances on Jan 31st and ensured that the status was "Stopped". However, on the 7th Feb, I noticed that the status of the RDS Instance was "Available".

Checking the logs, i'm unable to figure out what has caused the database to be back up again, While I also see a SIGHUP event not sure what had caused it. The Compute instance which was using the database was also shutdown along with RDS and it was still down, while the RDS instance was available.

PostgreSQL Log screenshot

Appreciate any insights on how to track/trace this.

2 Answers
2
Accepted Answer

Hello.

RDS starts automatically every 7 days for maintenance and updates.
The Lightsail database also uses RDS behind the scenes, so the same specifications apply.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html#USER_StopInstance.Operation:~:text=Automatic%20restart%20of%20a%20stopped%20DB%20instance

If you don't manually start your DB instance after it is stopped for seven consecutive days, RDS automatically starts your DB instance for you. This way, your instance doesn't fall behind any required maintenance updates. To learn how to stop and start your instance on a schedule, see How can I use Step Functions to stop an Amazon RDS instance for longer than 7 days?

Lightsail databases have fewer configuration items than RDS, and many parts are managed by Lightsail.
For example, instance types cannot be selected in the Lightsail database, and specifications are managed only by plans.
I think this is a system that allows people who are not familiar with AWS to get started right away.

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

2
    The situation you're describing, where your Lightsail RDS instance restarted on its own after being stopped, is unusual but not unheard of. There are a few potential explanations for this behavior:

    1. Automatic restart: Amazon RDS instances are designed to automatically restart after 7 days if they've been in a "Stopped" status. This is a built-in feature to prevent instances from remaining inactive indefinitely. In your case, the restart occurred exactly 7 days after you stopped the instance (Jan 31st to Feb 7th), which strongly suggests this automatic restart feature was triggered.

    2. Maintenance or updates: AWS may occasionally need to perform maintenance or apply critical updates to RDS instances, which could cause a restart. However, this typically doesn't apply to stopped instances.

    3. The SIGHUP event you observed in the logs is often associated with configuration reloads or restarts. In this context, it's likely related to the instance restarting and reloading its configuration.

    To track and trace such events in the future, you can:

    1. Check the RDS event logs more thoroughly for any patterns or recurring events that coincide with the restart times.

    2. Set up Amazon CloudWatch alarms to notify you of state changes in your RDS instances.

    3. Use AWS CloudTrail to monitor API calls related to your RDS instances, which might provide more insight into what triggered the restart.

    4. If you need to keep the instance stopped for an extended period, you might consider taking a snapshot and deleting the instance, then restoring from the snapshot when needed.

    If this behavior continues to cause issues or if you need to keep the instance stopped for longer than 7 days, it would be advisable to contact AWS support for further assistance or to explore alternative solutions.
  

Sources
Understand why Amazon RDS for Oracle DB instances automatically restart | AWS re:Post
AWS RDS PostgreSQL Restarts Intermittently (2-3 Times a Day) – No Maintenance or Failover | AWS re:Post
Troubleshooting for Amazon RDS - Amazon Relational Database Service

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Where can i find more info on the "Automatic Restart"?

    The closest i could get from the documentation is this, which doesn't clearly mention that a stopped database will be restarted.

    What does Lightsail manage for me?

    Lightsail manages a range of maintenance activities and security for your managed database and its underlying infrastructure. Lightsail automatically backs up your database and allows point in time restore from the past 7 days using the database restore tool, to help protect against data loss or component failure. Lightsail also automatically encrypts your data at rest and in motion for increased security and stores your database password for easy and secure connections to your database. On the maintenance side, Lightsail runs maintenance on your database during your set maintenance window. This maintenance include automatic upgrades to the latest minor database version and all management of the underlying infrastructure and operating system.

  • Hi, Thanks for letting us know about the documentation miss. We have updated our documentation with this callout - https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_StopRelationalDatabase.html

    If you don't manually start your database instance after it has been stopped for seven consecutive days, Amazon Lightsail automatically starts it for you. This action helps ensure that your database instance doesn't fall behind on any required maintenance updates.

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.