MySQLSyntaxErrorException: Row size too large
Problem
The following appears in the atlassian-confluence.log
:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Cause
This is caused either by the maximum allowed packet size of the MySQL server being too small, or when the InnoDB log file is too small (sometimes both).
For more information on the max_allowed_packet value or the innodb_log_file_size value please refer to these MySQL knowledge articles.
Resolution
- Shutdown Confluence
- Shutdown MySQL
Edit the my.cnf file (or my.ini in Windows)
If the following values do not exist in your configuration file, you must add them.
- Set
max_allowed_packet
to 512M Set
innodb_log_file_size
to 2GB (As stated in the MySQL installation guide for Confluence)"BLOB" write limit introduced for MySQL 5.6, the "innodb_log_file_size" setting should be 10 times larger than the largest "BLOB" data size found in the rows of your tables plus the length of other variable length fields ("VARCHAR", "VARBINARY", and "TEXT" type fields). No action is required if your "innodb_log_file_size" setting is already sufficiently large or your tables contain no "BLOB" data.
Reference:https://bugs.mysql.com/bug.php?id=69477
- Delete the current innodb log files. This is required so that MySQL can resize them on restart (MySQL will fail to start without this step).
- These will be called
ib_logfile*
and are usually located in/var/lib/mysql
on Linux If you're not sure where they are located, run
lsof -c mysqld | grep ib_logfile
with MySQL running to find them.Please ensure you only remove the ib_logfile files and not the ibdata files.
- These will be called
- Start MySQL.
- Start Confluence.
Check if the issue persists.
If the error continue to show up into the logs then repeat the above steps increasing both values to 768M (or 1GB). This value will vary depending on which add-ons you're attempting to install. The
innodb_log_file_size
should be set to a value 10 times the size of the add-on.