I received the following error when trying to write to an Amazon Relational Database Service (Amazon RDS) database instance for MySQL:

"Error_code: 1114; handler error HA_ERR_RECORD_FILE_FULL"

How can I resolve this error?

This error most often occurs on read replicas that cause the replication to fail. But this error can also occur when the table that the data is written to is full, or it can be caused by one of the following:

  1. The table that is sending the error message is a MEMORY engine table and the table reached its maximum size.
  2. The table is a MyISAM engine table and the table reached the maximum pointer size
  3. The table uses the InnoDB engine and the InnoDB tablespace file is full.
  4. The Amazon RDS instance has run out of disk space.
  5. The table has reached the file size limit

For more information about the storage engines that Amazon RDS supports, see Supported Storage Engines for MySQL on Amazon RDS.

1.    MEMORY engine table reached its maximum size

Confirm that the MEMORY engine table has reached its maximum size by running a command similar to the following and checking the engine value:

mysql> show table status from database_name like 'table_name'\G

If the value of the data_length variable in the output is greater than the value of the max_data_length variable, then the table has reached its maximum size. This is the cause of the error message.

You can resolve this error by increasing the size of the max_heap_table_size parameter in the custom parameter group associated with your DB instance. For more information, see Creating a DB Parameter Group. Be sure not to exceed the instance class memory limit that is based on the Amazon RDS instance class that you use. For more information about the memory available for your instance, see Amazon RDS Instance Types.

2.    MyISAM engine table reached the maximum pointer size

Confirm that the MyISAM engine table has reached the maximum pointer size by running a command similar to the following and by checking the engine value:

mysql> show table status from database_name like 'table_name'\G

You can resolve this error by using the ALTER TABLE command to alter the existing table's maximum size:

mysql> ALTER TABLE tbl_name MAX_ROWS=1000000000 AVG_ROW_LENGTH=nnn;

Optionally, you can change the default size limit for all MyISAM tables. Then, set the myisam_data_pointer_size parameter in your custom DB parameter group to a higher value.

3.    InnoDB tablespace file is full

The maximum tablespace size for an InnoDB table is four billion pages (64 TB). For more information, see the MySQL documentation for Limits on InnoDB Tables.

You can partition tables into multiple tablespace files for tables larger than 1 TB. You can use different types of partitioning, such as RANGE, LIST, HASH, and so on, to partition your table based on your use case. For example, you can truncate the old data based on the year it was created, or you can create separate partitions for each year. For more information, see MySQL File Size Limits and the MySQL documentation for Partitioning.

Important: Thoroughly test the impact that partitioning might have on your application before implementing the changes in a production environment.

You can convert an existing table to a partitioned table by using an alter table statement similar to the following:

ALTER TABLE table_name 
PARTITION BY HASH(id)
PARTITIONS 8;

Note: Converting an existing table to a partitioned table doesn't recover space allocated for the InnoDB tablespace. To recover the InnoDB space, see How do I resolve problems with my Amazon RDS MySQL DB instance that is using more storage than expected?

4. The Amazon RDS instance is out of disk space

If the Amazon RDS instance is in the STORAGE_FULL state, you receive the HA_ERR_RECORD_FILE_FULL error. To resolve this error, add more storage space to your DB instance. For more information, see Amazon RDS DB Instance Running Out of Storage.

Optionally, you can monitor the available storage space for the DB instance using the Amazon CloudWatch FreeStorageSpace metric. For more information, see the Overview of Monitoring Amazon RDS. You can also subscribe to the low storage Amazon RDS event notification so that you're notified when your DB instance consumes more than 90% of its allocated storage. For more information, see Amazon RDS Event Categories and Event Messages.

5.    The table has reached the file size limit

The File Size Limits in Amazon RDS constrain InnoDB file-per-table tablespaces to 16 TB, but some DB instances created before 2014 have a lower limit. For more information, see MySQL File Size Limits in Amazon RDS.

If you have an instance that has a lower size limit, you can take a dump of your data by using mysqldump. Then, import the data into a new DB instance that has a higher limit.


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2019-02-27