0

I am using sequelize in my application.

I have a quiet large table definition (90+ columns in that table).

If I create that table in phpmyadmin I am not getting any error but if I create that table using sequelize then I am getting folowing error:

(node:401343) UnhandledPromiseRejectionWarning: SequelizeDatabaseError: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
    at Query.formatError (~/node_modules/sequelize/lib/dialects/mysql/query.js:239:16)
    at Query.run (~/node_modules/sequelize/lib/dialects/mysql/query.js:54:18)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:401343) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:401343) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I have added below code in my.cnf following this https://stackoverflow.com/a/64968276/7043908 solution:

innodb_log_file_size=512M
innodb_strict_mode=OFF
innodb_log_buffer_size=256M

I have got this error before using seqlelize, when creating similar table in mysql (phpmyadmin). But above solution have solved the problem. Now this error is persistent even if I have added innodb_strict_mode=OFF in my.cnf

Deepak Rai
  • 2,163
  • 3
  • 21
  • 36
Hello World
  • 2,673
  • 7
  • 28
  • 60

0 Answers0