Common SQL Errors

MySQL Error 1799: ER_INNODB_ONLINE_LOG_TOO_BIG - How to Fix Index Creation Failures

Galaxy Team
August 7, 2025

<p>InnoDB exceeded the online ALTER modification log limit set by innodb_online_alter_log_max_size when creating or altering an index.</p>

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 1799 ER_INNODB_ONLINE_LOG_TOO_BIG?

<p>MySQL Error 1799 ER_INNODB_ONLINE_LOG_TOO_BIG appears when an online ALTER TABLE or CREATE INDEX operation needs more modification log space than innodb_online_alter_log_max_size allows. Increase the variable or run the ALTER offline to resolve the issue.</p>

Error Highlights

Typical Error Message

Creating index '%s' required more than

Error Type

Storage Engine Error

Language

MySQL

Symbol

ER_INNODB_ONLINE_LOG_TOO_BIG

Error Code

1799

SQL State

HY000

Explanation

Table of Contents

What does MySQL Error 1799 ER_INNODB_ONLINE_LOG_TOO_BIG mean?

MySQL raises Error 1799 when an online ALTER TABLE or CREATE INDEX statement generates more row changes than InnoDB can store in its online ALTER modification log. The log size ceiling is controlled by the global variable innodb_online_alter_log_max_size.

Because online DDL lets the table stay writable, every INSERT, UPDATE, and DELETE made during the operation must be tracked. When the tracking file outgrows the configured limit, InnoDB cancels the statement and returns ER_INNODB_ONLINE_LOG_TOO_BIG.

When does this error occur?

The problem surfaces on busy tables that receive continual writes while you build a new secondary index or change column definitions with ALGORITHM=INPLACE or ALGORITHM=INSTANT. Large batch jobs or replication traffic can quickly push the modification log past its maximum size.

The error is version dependent. It most commonly affects MySQL 5.6 to 8.0 where online DDL is widely used. Settings identical in forks such as MariaDB may also trigger similar messages.

Why is it important to fix?

Failed DDL blocks schema migrations, delays release cycles, and increases maintenance windows. Re-running large index builds wastes compute and I/O. Continuous failure can also leave applications without needed performance or functional improvements.

How does the modification log work?

InnoDB stores row changes made during online DDL in a temporary log file located in the same directory as the system tablespace. When the DDL finishes, InnoDB replays the log to bring the new index in sync before committing the operation.

The size limit prevents runaway disk usage, but conservative defaults may be too small for high-write workloads. Understanding and tuning this limit ensures reliable online schema changes.

Common Causes

High write volume during online DDL

Bulk imports, ETL jobs, or heavy OLTP workloads produce more row modifications than the log size can handle.

Low innodb_online_alter_log_max_size value

The default 128MB limit (varies by version) is insufficient for large tables or long-running index builds.

Long transaction holding metadata locks

Prolonged transactions extend the duration of the DDL, allowing the modification log to grow unchecked.

Disk space restrictions

Filesystem quotas or low free space force administrators to keep the log size small, increasing the chance of overflow.

Related Errors

MySQL Error 1206: ER_LOCK_WAIT_TIMEOUT

Occurs when DDL waits too long for metadata locks. Reducing transaction time or using NOWAIT clauses helps.

MySQL Error 1213: ER_LOCK_DEADLOCK

Signals a deadlock between DDL and DML sessions. Rearranging statement order or lowering isolation levels can prevent it.

MySQL Error 1025: ER_CANT_DROP_FIELD_OR_KEY

Raised when ALTER TABLE fails to drop an index or column due to dependencies. Removing constraints first resolves it.

FAQs

Can I change innodb_online_alter_log_max_size without restarting?

Yes. The variable is dynamic. Use SET GLOBAL and ensure the session has SUPER or SYSTEM_VARIABLES_ADMIN privilege.

What is a safe maximum value?

Choose a size below available disk free space. Values up to several gigabytes are common on production servers with large tables.

Does GALAXY help avoid this error?

Galaxy flags long-running online DDL in its SQL editor and suggests increasing the log size before execution, reducing trial-and-error migrations.

Will the change persist after restart?

No. Add innodb_online_alter_log_max_size to my.cnf or use SET PERSIST to make it permanent.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo