Internal Server Error: SQLSTATE[42000] 1118 Row size too large I have a very large entry type in craft with quite a few fields.  I've been updating a single record on a regular basis but upon adding a few more paragraphs of rich text in a field, I received this error when trying to save:


  Internal Server Error
  
  CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1118 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.


Is there some other solution beyond what the error is suggesting? Not sure what I'm missing. Any thoughts would be appreciated.

Thanks!

UPDATE 10/1

I was able to get the existing table in my Craft instance updated to the barracuda file format with row_format=DYNAMIC. Updated the global MySQL params as well:

+--------------------------+-----------+
| Variable_name            | Value     |
+--------------------------+-----------+
| innodb_file_format       | Barracuda |
| innodb_file_format_check | ON        |
| innodb_file_format_max   | Barracuda |
| innodb_file_per_table    | ON        |
+--------------------------+-----------+


The problem now is with new matrix fields: the newly created tables are not being set to the row_format=DYNAMIC. Is there somewhere in Craft where I need to update this? Or is there somewhere else I need to update this?
You're running into a MySQL/InnoDB server limitation that commonly occurs with a significant number of columns in a single table.

Fortunately, there are several documented workarounds for it:

https://stackoverflow.com/questions/15585602/change-limit-for-mysql-row-size-too-large

https://www.percona.com/blog/2011/04/07/innodb-row-size-limitation/

https://dba.stackexchange.com/questions/6598/innodb-create-table-error-row-size-too-large

From the Craft side, another workaround would be to re-think your information architecture. Currently, most fields in Craft have their content stored in the craft_content table in the database, so when you have a lot of textual fields on the site, you'll see the error you're getting.  The exception to this rule is Matrix fields, which get their own table where their content is stored.

If you can move any of those fields into Matrix fields where they make sense, you'll take them out of the craft_content table helping mitigate the issue.