0

I'm using CiviCRM in multilingual mode. I can generally create events (and other objects) fine. However, I often run into update problems at some point. The interface will "spin" and never save.

Looking at the CiviCRM error log reveals a database error:

nativecode=1118 ** Row size too large (> 8126)

I have looked at this clearly related case: Database error when using CiviCRM admin UI: "Row size too large"

I have tried (with some trepidation because I haven't worked on the Civi backend yet and don't know where the pitfalls are) to change the ROW_FORMAT of Civicrm_event_en_CA to Dynamic, but am told that it is not a base table.

I'm not really clear as I am more of a db user than a programmer, but assume that this table is somehow subsidiary to civicrm_event.

That table is set to ROW_TYPE=COMPACT. I'm game to change it, but it seems drastic enough that I am wondering:

  1. Is it safe to do so WRT to CiviCRM operation?
  2. Will it persist through a CiviCRM upgrade or will it revert (and potentially throw away data)?
2
  • Hi Keith, this maybe not cure your issue totally as it really depends on how many languages you have enabled. CiviCRM adds columns for every language you enable and sooner or later you'll start to hit limits. To get a better understanding of things it would be good to know the version of MySQL/MariaDB you're using. Commented Oct 2, 2019 at 10:18
  • Thanks Parvez. I just have two languages in this installation, though I have another client with 3. The MariaDB version is 10.1.41-MariaDB-0+deb9u1 Debian 9.9. My CiviCRM version here is 5.16.2
    – kapn
    Commented Oct 2, 2019 at 14:08

2 Answers 2

2

this might be a mariadb config issue.

# enable large indexes and Barracuda
# for utf8mb4
innodb_file_per_table=1
innodb_file_format=Barracuda
innodb_large_prefix=1

might also change the tables to ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED see this post for much more info on this front https://stackoverflow.com/questions/15585602/change-limit-for-mysql-row-size-too-large

but do not follow the suggestion there to alter the tables to use MyISAM instead of INNODB, that's a really bad idea.

2
  • Looks like I already made the overall config change to deal with a CiviCRM upgrade a while back (glad I left a note to myself in a config comment). So, at this point I should be able to alter the ROW_FORMAT to DYNAMIC or COMPRESSED and that will be a safe change and persist through CiviCRM upgrades?
    – kapn
    Commented Oct 8, 2019 at 16:53
  • 1
    yes, that change is safe and will persist
    – ericG
    Commented Oct 16, 2019 at 16:53
-1

Adding this for ease of reference... In addition to the above innodb config, you will need to check the tables as @Keith Nunn alluded to. There are two tables that may need tweaking, SQL code below (row format is the key, but no harm to make sure block size and engine are set):-

ALTER TABLE civicrm_contribution_page
ENGINE=InnoDB
ROW_FORMAT=COMPRESSED 
KEY_BLOCK_SIZE=8;

ALTER TABLE civicrm_event
ENGINE=InnoDB
ROW_FORMAT=COMPRESSED 
KEY_BLOCK_SIZE=8;
2
  • 1
    I would advise against using ROW_FORMAT=COMPRESSED there's a good amount of overhead spent in compressing/decompressing data. unless there's a specific need for that, ROW_FORMAT=DYNAMIC , has been a better option for the sites I deal with
    – ericG
    Commented Jan 17, 2020 at 5:14
  • @ericG thanks for the heads up. We'll keep an eye on the performance and tweak if needed. The customer doesn't have that many events or contribution pages so hopefully won't be an issue.
    – Darren
    Commented Jan 20, 2020 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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