0

We are building out web applications for one client and have been using Craft to do so. However, I think we may have just hit a limit in the number of fields that Craft will support. More specifically this looks to be more of a MySQL limit. I had recently encountered a similar issue with a single entry that exceeded the row size with too much rich text. This was resolved with an update to the innodb file format, setting it to barracuda.

Unfortunately this is not helping me in this instance as the limitation is now the total byte count for the number of columns, not the actual content.

I've tried changing any columns in the table to 'text' and looked at any other tweaks based on the described limitations, but to no avail.

I'm at a loss for what to do at this point as I am unable to even add one more field without an error being thrown and the DB becoming corrupt.

As soon as I save that one more variable, I get this error:

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 may help.
In current row format, BLOB prefix of 0 bytes is stored inline.

Then when I try to access the admin or any template on the site, I get this error:

Internal Server Error

CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]:
Column not found: 1054 Unknown column 'content.field_heroCtaTitle' in 'field list'

The bummer with this error is I can only recover with a database restore. Didn't want to try and hack out the bad field.

In the short term, I may try to replace some standard fields with matrix fields which should reduce the number of columns in the craft_content table, but this is not really an ideal approach.

Any other thoughts, ideas, hacks would be greatly appreciated!

1

I came into a similar problem with rich text areas and front end form submissions maxing out memory very easily. It may not solve your issue at the root but as you asked for any thoughts ideas or hacks and for the issue you state. In the rich text field options at the bottom you can change "column type" to "medium editor" which bumps storage from 64K to 4GB. enter image description here

Hope that helps in any slight way, sorry if it's off point.

4
  • Setting Max Lengths on your Plain Text fields will also affect their content column sizes. Oct 2 '15 at 16:14
  • Is there a standard set if no max length is given? Oct 2 '15 at 16:43
  • By default it will be TEXT. If you set a Max Length it will be the smallest textual column type possible that can accommodate the Max Length. Oct 2 '15 at 17:22
  • Thanks @GeorgeDunning for the thought. The innodb_file_format being set to barracuda has solved that previous issue (where this concept would have also helped), but as Brandon pointed out, setting a max length will affect the column size and actually increases the byte count. At this point I have no choice but to install another instance of Craft. Fortunately this new app is not quite as coupled to the others but may have to think about this for future updates. Thanks for the thoughts and feedback!
    – jooosh
    Oct 2 '15 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.