DBAtlas · Database operations atlas

1197: Multi-statement transaction required more than 'max_binlog_cache_size'

MySQL

What does it mean?

The binlog data generated by a single transaction exceeded the memory/cache limit defined by max_binlog_cache_size. The transaction did not fit into the binary log, so it failed and was rolled back.

Why does it happen?

A very large transaction (a single INSERT/UPDATE/DELETE of millions of rows or a huge bulk load) filled the binlog cache. With binary logging enabled (replication/point-in-time recovery), large transactions can easily exceed this limit.

How to fix it

Split the large transaction into smaller batches; COMMIT after each batch. If truly large transactions are unavoidable, increase max_binlog_cache_size (and binlog_cache_size if needed). In ETL/bulk loads, a chunked load with intermediate COMMITs prevents both this error and long-held locks.

Open in DBAtlas →

More from this engine