Durch die Nutzung von AWS re:Post stimmt du den AWS re:Post Nutzungsbedingungen

Why does my Amazon RDS DB instance have low free storage space or why is my DB instance in a storage-full state after I turned on storage autoscaling?

Lesedauer: 6 Minute
0

I activated storage autoscaling for my Amazon Relational Database Service (Amazon RDS) DB instance, but I see that the free storage space is below 10% or that the instance is in a storage-full state. Why is this happening, and how can I fix this?

Short description

If you changed the RDS DB instance’s storage, you can’t make further modifications for six (6) hours, or until the storage-optimization process has completed. The storage modification period usually takes a few seconds to complete and takes effect after the volume has transitioned to the optimizing state. Sometimes storage-optimization can take more than 24 hours for a new configuration to take effect, such as when the volume has not been fully initialized. For more information about the storage process, see Monitor the progress of volume modifications

During the storage modification storage-optimization period, autoscaling can't increase your DB instance's storage, even if there's less than 10% of free storage space. For more information, see Increasing DB instance storage capacity.

When you have increased the RDS DB instance's storage using autoscaling, additional storage increases in increments of whichever of the following is greater:

  • 5GB
  • 10% of currently allocated space
  • Storage growth prediction for 7 hours based on the FreeStorageSpace metrics for the past hour

However, if you expect to load 50 GB of data in less than one hour, then the 10% storage increase won't be sufficient. Because the previous autoscaling operation is in the storage-optimization period, the RDS DB instance can't have any storage modifications until the process completes. This might result in an RDS DB instance that is in a storage-full status for up to several hours.

Resolution

If you can't modify the storage of your RDS DB instance, check the following to identify if your instance is affected by the storage-optimization period:

  • The status of your RDS DB instance is storage-optimization
  • The status of your RDS DB instance is storage-full or available, but there was a recent storage modification. To confirm that a storage increase operation was recently performed, check your RDS DB instance's events for the following messages:
    "Finished applying modification to allocated storage"
    -or-
    "Finished applying autoscale initiated modification to allocated storage"

If recent storage modifications activated storage-optimization, you can restore your database to an RDS DB instance with more Amazon Elastic Block Store (Amazon EBS) storage. If the RDS DB instance is in storage-full state, you must first stop any data loads to the RDS DB instance. Then you can release storage space from your RDS DB instance by following the process for your specific database engine. 

Note: This process takes from a few minutes to several hours before the instance is no longer in a storage-full state.

If the RDS DB instance isn't in a storage-full state, you can use the following options to modify your DB instance storage size:

  • Option 1: Create and promote a read replica of your RDS DB instance
  • Option 2: Take a manual DB snapshot and restore your RDS DB instance to a point in time
  • Option 3: Autoscaling is turned on but you don't want it to activate due to low FreeStorageSpace

Options 1 and 2 result in downtime for your database. However, creating and promoting a read replica results in less downtime. Read replicas are supported by the MariaDB, Microsoft SQL Server, MySQL, Oracle, and PostgreSQL DB engines.

Option 1: Create and promote a read replica of your RDS DB instance

  1. Create a read replica of your RDS DB instance.
  2. Manually increase the storage capacity of the read replica. By default, Amazon RDS storage autoscaling is deactivated on the read replica.
  3. Rename your active RDS DB instance to a different name. This stops all incoming traffic.
  4. Rename the read replica to the name that was previously used by your active RDS DB instance. This changes the read replica endpoint to be the same as the active RDS DB instance and you will not have to reconfigure your applications.
  5. Promote your read replica.

Note: For the application, or for the client, the database downtime occurs during steps 3–5.

Option 2: Take a manual DB snapshot and restore your RDS DB instance to a point in time

  1. Rename your active RDS DB instance to stop all incoming traffic. This prevents the RDS DB instance from reaching a storage-fullstate. If the RDS DB instance is in a storage-full state, you can't proceed with the next step to take the manual snapshot.
  2. Take a DB snapshot of your RDS DB instance. Taking a new snapshot prevents the restored RDS DB instance from being affected by a storage-optimization storage modification event.
  3. Restore your RDS DB instance to a point in time by choosing the latest restorable time. Then for the instance identifier, enter the name that was used by your active RDS DB instance.
    Note: To avoid any further autoscaling increases that result in a storage-optimization, don't activate autoscaling for now.
  4. Optionally, modify the restored RDS DB instance to include any custom security groups. The default database security group is applied to the new RDS DB instance. If you use any custom security groups, set them now.
  5. Manually increase the storage capacity of the new RDS DB instance.

Note: For the application or client, the database downtime occurs during steps 1–4.

Option 3: Autoscaling is turned on but you don't want it to activate due to low FreeStorageSpace

Turning off autoscaling prevents it from allocating additional storage automatically. This feature allows the manual allocation of storage to the instance. Turning off autoscaling might be done when you want manual control of storage allocation. For example, autoscaling will increase storage by 10% but you anticipate that you will add more than 10% before the next autoscaling event is initiated.

  1. Open the Amazon RDS console.
  2. Choose Modify.
  3. From Storage Autoscaling, uncheck Enable storage autoscaling.
  4. Choose Continue.
  5. Next, choose either Apply immediately, or, Apply during the next scheduled maintenance window.
  6. Choose Modify DB Instance.

Note: Autoscaling is initiated when the FreeStorageSpace metric is less than 10% for at least five minutes. And when at least six hours have passed since the last storage-modification, or storage-optimization has completed on the instance, whichever is longer.


Related information

Working with storage for Amazon RDS DB instances

How can I identify what is causing the "No space left on device” or "DiskFull" error on Amazon RDS for PostgreSQL?

How do I resolve problems with my Amazon RDS Oracle DB instance that's using more storage than expected?

How do I resolve problems with my Amazon RDS MySQL DB instance that's using more storage than expected?

How can I troubleshoot storage consumption in my Amazon RDS DB instance that is running SQL Server?

AWS OFFICIAL
AWS OFFICIALAktualisiert vor 2 Jahren