All Products
Document Center

My ApsaraDB RDS for MySQL instance automatically locks after its disk space is exhausted. What do I do?

Last Updated: Jun 02, 2021

Problem description

If your RDS instance executes specific SQL statements or is under attack, its disk space may be exhausted. Then, your RDS instance automatically locks to prevent data loss. In this case, you cannot write data to your RDS instance.


The following issues may cause disk space to be exhausted:

  • A large number of data files
  • A large number of binary log files
    If you do not correctly configure the parameters for log backup, the number of binary log files may surge as a result of large transactions.
  • A large number of temporary files
    A large number of temporary files and binary log files occupy a large amount of disk space. The temporary files are generated by the sorting, grouping, and table join operations in query statements. The binary log files are generated before large transactions are committed.
  • A large number of system files
    System files include the spatial file of the system table ibdata1 and the log files ib_logfile0 and ib_logfile1. InnoDB tables support multiversion concurrency control (MVCC). Therefore, the undo logs required by queries are stored in the ibdata1 file. If a query on an InnoDB table lasts long and a large amount of data in the table changes during the query, a large number of undo logs are generated. This increases the size of the ibdata1 file.
    Note: Due to the implementation limits of MySQL, the size of the ibdata1 file cannot be shrunk. The ib_logfile0 and ib_logfile1 files store the transaction logs on InnoDB tables. The sizes of the files are fixed and cannot be changed.


  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select the region where your RDS instance resides. Then, find your RDS instance and click its ID.
  2. In the left-side navigation pane, click Monitoring and Alerts. On the page that appears, view the types of files that occupy a large amount of disk space.
  3. Select a solution based on your actual condition.


Application scope

  • ApsaraDB RDS