1663
MariaDBERRORCommonInnoDBHIGH confidence

Online ALTER TABLE row log exceeded innodb_online_alter_log_max_size

Production Risk

High — the ALTER is rolled back; the table remains unchanged but the operation must be retried.

What this means

During an online ALTER TABLE operation, the temporary log file that records concurrent DML changes grew beyond the limit set by innodb_online_alter_log_max_size, causing the ALTER to be aborted.

Why it happens
  1. 1High concurrent DML activity during a long-running online ALTER TABLE.
  2. 2innodb_online_alter_log_max_size is set too small for the workload.
How to reproduce
trigger — this will error
trigger — this will error
ALTER TABLE large_table ADD INDEX idx_col (col), ALGORITHM=INPLACE, LOCK=NONE;

expected output

ERROR 1663 (HY000): Creating index 'idx_col' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again.

Fix 1

Increase innodb_online_alter_log_max_size

Increase innodb_online_alter_log_max_size
SET GLOBAL innodb_online_alter_log_max_size = 1073741824; -- 1 GB

Why this works

A larger log limit accommodates more concurrent DML during the rebuild.

Fix 2

Retry the ALTER during a low-traffic period

Retry the ALTER during a low-traffic period
-- Schedule the ALTER TABLE during a maintenance window with low write activity

Why this works

Less concurrent DML generates a smaller modification log.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 1663 ER_INNODB_ONLINE_LOG_TOO_BIG

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors