Introduction
Working with MySQL, you may encounter various errors that can disrupt system operations. Error code 1114 is one of them and indicates a situation where the table the user is trying to write data to is full. This issue is particularly significant in the MySQL replication system, where its resolution is crucial for ensuring work continuity.
Problem Description
Error 1114 manifests itself with the message: “Could not execute Write_rows event on table docs; The table ‘docs’ is full”. This means that new rows cannot be written due to exceeding the size of the temporary table. The detailed error message might look like this:
Login to MySQL:
1 |
# mysql -u root -p |
Change variable values:
1 2 |
SET GLOBAL tmp_table_size = 268435456; -- Set to 256M SET GLOBAL max_heap_table_size = 268435456; -- Set to 256M |
After making these changes, all new connections to the MySQL server will use these updated values. You can verify them by performing:
1 2 |
SHOW GLOBAL VARIABLES LIKE 'tmp_table_size'; SHOW GLOBAL VARIABLES LIKE 'max_heap_table_size'; |
Or
1 |
SELECT @@tmp_table_size, @@max_heap_table_size; |
Now replication can be resumed and should work better. However, remember to modify the configuration so that after restarting MySQL these variables are set correctly. It may be necessary here to resume replication (if it was previously stopped):
1 |
START SLAVE; |
If the problem has been resolved, at this stage checking the replication status:
1 |
show slave status \G |
Should not return any errors.
Modify the configuration file /etc/mysql/my.cnf
:
1 2 3 4 5 |
# cat /etc/mysql/my.cnf ... tmp_table_size=256M max_heap_table_size=256M ... |
Restart MySQL service:
1 |
# systemctl restart mysql |
Before restarting the service, it is recommended to execute SHUTDOWN;
in the MySQL client.
Remember to resume replication.
Important Notes
- System Resources: Ensure the server has sufficient RAM to handle the increased variable values.
- Performance Monitoring: After making the changes, monitor performance to verify that the problem has been resolved.
- Configuration Durability: Changes to the configuration file should be permanent to avoid resetting values after a restart.
Additional Verification Steps
- Check Available Disk Space: The problem might also stem from lack of available disk space. This can be verified using the following command:
1 |
# df -h |
Summary
Resolving the issue associated with error code 1114 in MySQL replication requires understanding and adjusting the system configuration. The described steps show how increasing the size of the temporary table can prevent this error, enabling smooth operation of the replication system.