All Products
Search
Document Center

ApsaraDB RDS:What do I do if the storage capacity of an ApsaraDB RDS for MySQL instance is exhausted by binary log files?

Last Updated:Mar 28, 2026

When binary log files consume all available storage, RDS automatically locks the instance to prevent data loss. A locked instance rejects all write operations.

To confirm the cause, check the Disk Space (MB) chart on the Standard Monitoring tab of the Monitoring and Alerts page. If log files account for most of the disk usage, follow the steps below.

Disk Space chart showing log file usage

Why binary logs exhaust storage

Large transactions generate binary log files rapidly. If write activity outpaces the upload-and-delete cycle, binary logs accumulate until storage is full and the instance enters the Locked state.

Prerequisites

Before you begin, ensure that you have:

This step is required for MySQL 5.5, 5.6, 5.7, and 8.0.

Recover storage by uploading binary logs

Use the Upload Binlogs feature to move binary log files to an Object Storage Service (OSS) bucket and free up local storage.

How it works: Clicking Upload Binlogs submits an asynchronous background task. Binary log files that have finished writing are uploaded to an automatically provisioned OSS bucket, then deleted from the instance. Files currently being written cannot be deleted.

RDS Basic Edition does not support the Upload Binlogs feature. If your instance runs RDS Basic Edition, adjust the retention policy instead — see Adjust the binary log retention period below.
  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select the region where your instance resides.

  2. Find the instance and click its ID.

  3. In the left-side navigation pane, click Backup and Restoration.

  4. Click Upload Binlogs. In the message that appears, click OK. Wait approximately 15 minutes for the upload to complete. This operation deletes all binary log files except the two most recent. If only two files exist, no files are deleted. Do not click Upload Binlogs again while the task is running.

Upload Binlogs button

Verify the result: After the upload completes, go to the Basic Information page and confirm that disk usage has decreased.

Binary logging records transaction events that support high availability and point-in-time recovery. Do not disable binary logging. Instead, use Upload Binlogs or adjust the retention period to control storage usage. For details, see Delete the binary log files of an ApsaraDB RDS for MySQL instance.

Adjust the binary log retention period

Shortening the retention period reduces how long binary log files are kept on the instance before being uploaded to OSS. Setting the Retention Period to 0 uploads binary log files to an OSS bucket immediately, without storing them locally.

  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select the region where your instance resides.

  2. Find the instance and click its ID.

  3. In the left-side navigation pane, click Backup and Restoration.

  4. On the Backup Settings tab, click Edit to the right of Local Log Backup Settings. Adjust the retention period to match your requirements, then save the changes.

Local Log Backup Settings

If binary logs keep filling storage rapidly

During large DML operations — especially those involving large fields — binary log files can be generated faster than they can be uploaded to backup storage. In this case:

  • Expand storage capacity to create headroom.

  • Identify and address the root cause of the rapid binary log growth (for example, unintended large transactions or missing batch size limits).

What's next

After the instance is unlocked, enable the automatic storage expansion feature to prevent future lockouts. See Configure automatic storage expansion for an ApsaraDB RDS for MySQL instance.

References