Row size too large (> 8126) exception on adding appcenter application

4.7k Views Asked by At

I'm trying to deploy the worklight application center for iOS on a Websphere Liberty server on Windows 8.1. But I'm getting following exception in the server logs when I try to add the IBMAppCenter.ipa via the appcenter console.

Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. {prepstmnt 1563792952 INSERT INTO APPLICATION_STORAGE (CONTENT, AP_FK) VALUES (?, ?) [params=(InputStream) java.io.ByteArrayInputStream@5987916, (null) null]} [code=1118, state=42000]

Here is the scenario to reproduce my problem:

  1. install mysql 5.6.2 via the mysql community installer
  2. install Websphere Liberty application server v8.5.5
  3. install Worklight Server v6.2
  4. generate IBMAppCenter.ipa via XCode
  5. login to the appcenterconsole and try to add the application

I tried to enable compression for table APPLICATION_STORAGE as proposed by hjpotter92 on Change limit for "Mysql Row size too large" but without any luck. Any help would be much appreciated.

EDIT

Here is the definition of the APPLICATION_STORAGE table, which causes the problem:

CREATE TABLE APPLICATION_STORAGE (ID INTEGER NOT NULL AUTO_INCREMENT, CONTENT LONGBLOB, AP_FK INTEGER, PRIMARY KEY (ID)) ENGINE = innodb;
1

There are 1 best solutions below

1
On BEST ANSWER

Increasing the innodb_log_file_size property to 256M resolved my issue. Apparently the redo-log overwrites the most recent checkpoint for large blobs, as explained here: http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-20.html

Important Change: Redo log writes for large, externally stored BLOB fields could overwrite the most recent checkpoint. The 5.6.20 patch limits the size of redo log BLOB writes to 10% of the redo log file size. The 5.7.5 patch addresses the bug without imposing a limitation. For MySQL 5.5, the bug remains a known limitation.

As a result of the redo log BLOB write limit introduced for MySQL 5.6, innodb_log_file_size should be set to a value greater than 10 times 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). Failing to do so could result in “Row size too large” errors. No action is required if your innodb_log_file_size setting is already sufficiently large or your tables contain no BLOB data. (Bug #16963396, Bug #19030353, Bug #69477)