Jump to:

23472 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » [Solved] Row size too large (> 8126)

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1816 Views
  • bxxxxx
    Avatar
    Community Member
    8 Posts

    [Solved] Row size too large (> 8126) Link to this post

    Hi there,

    I created a *very large* object containing about 20 different Text-Fields.
    When saving the object, I get the error:

    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.

    The messages tells me, that in the current configuration each of the Text-Fields stores 768 bytes inline and then the total allowed 8126 per row is exceeded.

    Is there a way to tell Silverstripe to configure some table as innodb ROW_FORMAT = dynamic and keep the object structure?

    What happens, if I do this on the database level (mysql) and make Silverstripe rebuild the structure (dev/build after model changes)?

    Or maybe, is there any other solution for this problem?

    Thanks in advance
    and best regards

    Stefan

  • bxxxxx
    Avatar
    Community Member
    8 Posts

    Re: [Solved] Row size too large (> 8126) Link to this post

    The answer by myself:

    I did it on the database level.

    1. Make a database_dump and stop the SQL engine

    2. The DB has to be configured Like:

    in my.cnf section [mysqld|

    innodb_file_per_table
    innodb_file_format = Barracuda

    3. Restart the SQL server

    4. Fire the following SQL for every table which is affected:

    ALTER TABLE %%Name%%
    ENGINE=InnoDB
    ROW_FORMAT=COMPRESSED
    KEY_BLOCK_SIZE=8;

    Do not forget to alter also %%Name%%_Live , %%Name%%_versions if the affected table is Sitetree based.

    The /dev/build command keeps this configuration unchanged.

    The database backup is for your own insurance. Mysql changes the file structure of the databases on the fly.
    Be aware, that the configuration is enabled for all databases on your machine.

  • sirocco
    Avatar
    Community Member
    11 Posts

    Re: [Solved] Row size too large (> 8126) Link to this post

    Hi there.

    Thanks for that resolution. I also ran into this issue on a test SS v3.1.5 install. I note that the same issue does not exist on SS 2.x (same reproduction steps successfully allowed saving of data - SS version was only difference between two tests, no DB config changes or similar.)

    1816 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.