Skip to content

Why did my RDS instance stop automatically?

0

I have an RDS instance with Postgres, and all of a sudden it was turned off "temporarily" for 6 days. I reviewed the Terraform code managing it, and did not find anything that could cause the instance to be stopped. I am the only one currently working with this instance so I don't think someone else turned it off. Note that my usage is very low currently, so I didn't exceed any limits, plus I did not receive any email or notification related to this.

Any idea on why it was stopped, presumably by AWS? And any ideas on how to prevent it in the future to avoid data loss.

Thank you.

asked a year ago536 views

2 Answers
2
Accepted Answer

Hi,

AWS CloudTrail automatically keeps a record of any actions taken by a user, role, or AWS service for the last 90 days in each region, so you can use it to figure out what happened.

I hope this helps.

EXPERT

answered a year ago

EXPERT

reviewed a year ago

  • Agree with looking into cloudtrail. Make sure you are in the same region as your RDS when looking at CT

  • Thank you! There was an automated scheduler that shut down my instance. CloudTrail was a massive help!

0

Based on the information provided, it's unlikely that your RDS instance stopped automatically due to low usage or exceeding limits. In fact, RDS instances don't typically stop on their own unless explicitly configured to do so.

However, there is an important behavior to note regarding RDS instances that have been manually stopped. If an RDS instance remains in a "Stopped" state for 7 consecutive days, AWS automatically starts the instance. This is a built-in feature to prevent instances from remaining inactive indefinitely and to ensure they don't fall behind on required maintenance updates.

In your case, you mentioned the instance was "turned off temporarily for 6 days." This suggests that the instance may have been manually stopped at some point, either intentionally or unintentionally. After 7 days, it would have automatically restarted if left in that state.

To prevent unexpected stops or starts in the future:

  1. Regularly review your RDS instance status and any recent actions taken on it.
  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 any stops or starts.
  4. If you need to keep the instance stopped for an extended period, consider taking a snapshot and deleting the instance, then restoring from the snapshot when needed.

If you continue to experience unexpected behavior with your RDS instance, it would be advisable to contact AWS support for further assistance, as they can provide more detailed insights into your specific situation.
Sources
Lightsail RDS Instance - Restarted on its own | AWS re:Post
Understand why Amazon RDS for Oracle DB instances automatically restart | AWS re:Post

answered a year ago

EXPERT

reviewed a year ago

  • Point 3 was the best place to find out who shut it down while the 1 and 2 are monitoring steps

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.