Limit Custom Fields for the Custom Groups

Development Status
Stable
Active Installs
Maintainers
Pobierz

Last updated: 2021-06-01

Works with CiviCRM 5.0 or higher.

The MySQL Row Size Reality

MySQL has a fundamental limitation: each table row cannot exceed 65,535 bytes. This includes storage overhead for all columns, indexes, and metadata. When you create custom fields in CiviCRM, each field consumes bytes toward this limit based on:

  • Field type and size: VARCHAR fields reserve their maximum declared length
  • Character set collation: UTF8 characters can use up to 4 bytes each
  • Index overhead: Database indexes require additional storage
  • MySQL storage mechanics: Internal row structure adds overhead

Introducing Proactive Protection

The Limit Custom Fields for the Custom Groups Extension solves this problem before it becomes a crisis. Instead of discovering row size limits through system failures, the extension monitors your custom field usage and prevents dangerous additions before they cause database errors.

Intelligent Monitoring

The extension continuously calculates the row size for each custom group table, taking into account:

  • Current field sizes and types
  • Character set and collation requirements
  • Index storage overhead
  • MySQL storage mechanics

Proactive Button Disabling

When a custom group approaches its row size limit, the extension automatically disables the "Add New Custom Field" button. This prevents accidental database errors while clearly indicating why new fields cannot be added.

Why This Matters More Than Ever

As CiviCRM installations mature and grow more sophisticated, custom field usage naturally increases. Organizations that successfully deployed CiviCRM years ago with simpler field structures now find themselves approaching limits they never knew existed.

The cost of encountering row size limits in production includes:

  • System downtime during error resolution
  • Data entry disruption when forms stop working
  • Emergency database maintenance often requiring expert intervention
  • Lost productivity while teams wait for fixes

Prevent Rather Than React

Database row size limits are a fundamental MySQL constraint that cannot be wished away. The Limit Custom Fields extension provides the monitoring and protection your CiviCRM installation needs to avoid database disasters.

Supporting Organizations
Skvare

Protect Your Database Today

Don't wait for a row size error to disrupt your operations. Install proactive monitoring that prevents problems before they occur, helps clean up existing issues, and provides ongoing visibility into your custom field architecture.

Your future self will thank you for preventing a database crisis that could have been avoided with proper monitoring and limits.


Contact us for support or to learn more about implementing database protection and custom field management in your CiviCRM environment.

Screenshot (click to enlarge)