Error when enabling module - MySQL too many keys

Created on 23 July 2022, over 2 years ago
Updated 9 May 2024, 8 months ago

Problem/Motivation

When installing and enabling this module I got a MySQL error saying it was trying to make too many keys. It was trying to create an index for every custom field, I think.

(Sadly there is no setting in MySQL to increase the number of keys allowed. One has to recompile it from source which is not feasible in most circumstances.)

The module then appeared to be installed, and I was able to create a view of CiviCRM contacts. But it made the whole site extremely slow. I tried to disable it but the process of disabling it did not complete within the PHP max execution time of 20 minutes. I had to restore the database from backup as there was no way to remove the module.

Steps to reproduce

Create lots of custom fields in CIviCRM and then try to enable this module

Proposed solution

Check for how many indices are required before creating them. If it is more than 64 (the maximum) then don't create them.

πŸ› Bug report
Status

Fixed

Version

3.3

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom hoegrammer

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024