Tangerine
Tangerine copied to clipboard
Mysql tables not populating; ER_TOO_BIG_ROWSIZE error in tangerine logs
Current Tangerine version: v3.26.0
Mysql Configuration:
- version 8.0.31.
- Engine InnoDB
- Version 10
- Row_format Dynamic
- Collation utf8mb4_0900_ai_ci
This error happens with very large mysql tables. New columns are not created and records are not inserted.
Example of Tangerine log error:
2022-12-08T15:57:23.990Z ERROR insertDocument (/tangerine/server/src/modules/mysql-js/index.js:917:15)
{"code":"ER_TOO_BIG_ROWSIZE","errno":1118,"sqlState":"42000","sqlMessage":"Row size too large.
The maximum row size for the used table type, not counting BLOBs, is 8126.
This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs",
"sql":"alter table `groupfab49a530de3477d9ac901d5f0620b0d`.`mnh_maternal_ld_outcome_intra` add `sari_cestdat` text"}
2022-12-08T15:57:23.991Z ERROR processFormResponse (/tangerine/server/src/reporting/data-processing.js:75:9)
Error processing doc 70d9dd9a-4e84-4618-89be-9331413822b2 in db group-fab49a53-0de3-477d-9ac9-01d5f0620b0d:
{"stack":"Error: Error inserting document: {}\n at saveToMysql (/tangerine/server/src/modules/mysql-js/index.js:830:11)\n
at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:93:5)\n
at async addDocument (/tangerine/server/src/modules/mysql-js/index.js:239:28)\n
at async Object.reportingOutputs (/tangerine/server/src/modules/mysql-js/index.js:253:7)\n
at async TangyModules.hook (/tangerine/server/src/modules/index.js:15:16)\n
at async processFormResponse (/tangerine/server/src/reporting/data-processing.js:70:26)","message":"Error inserting document: {}"}
Example of MySql errors:
2022-11-14T20:01:25.835351Z 33 [ERROR] [MY-011825] [InnoDB] Cannot add field `previousFocusIndex` in table
`group27ae3f7e99bd4154a56fee6872999b36`.`#sql-ib1174-932110602`
because after adding it, the row size is 8162 which is greater than maximum allowed size (8126) for a record on index leaf page.
Current solution - Adding the following parameters to the mysql config file:
innodb-strict-mode=OFF
innodb-page-size=32K
innodb-log-buffer-size=128M