Fix MySQL Row Size Too Large Error in Skyvia Replication

Replication: MySQL Error: Row size too large (> 8126)

Overview

When performing replication to MySQL you can encounter this error:

Quote
An error occurred while creating table 'Invoice'. Error: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

This error arises because the total size of the columns in a row exceeds 8126 bytes (e.g., VARCHAR(50) + VARCHAR(50) + VARCHAR(100) ...). This is due to multiple fields with variable-length data types.

Resolution

  1. Convert some columns to TEXT or BLOB. These data types allocate only a few bytes in the row to reference the data stored elsewhere, allowing more columns to fit within the row size limit. Note that this requires server-side configuration changes.
  2. Increase the row size limit (> 8126 bytes) by modifying relevant server settings, as detailed in the MariaDB InnoDB page size documentation. Note that this requires server-side configuration changes.
  3. If feasible, remove unnecessary columns from the table schema to decrease the row size.

The simplest solution is to eliminate non-essential columns, if possible, to avoid server-side modifications.

    • Related Articles

    • MySQL: Lost connection to MySQL server during query

      Overview The error Lost connection to MySQL server during query occurs when the connection between Skyvia and the MySQL server is dropped while a command is being executed. This typically happens when processing large datasets or when server-side ...
    • HubSpot: 414 Request-URI Too Large / 400 Request Header or Cookie Too Large

      Overview The errors 414 Request-URI Too Large and 400 Request Header or Cookie Too Large are returned by the HubSpot API when a single API request exceeds the maximum allowed size. This typically occurs when querying HubSpot objects that have a large ...
    • Replication creates extra tables in the database

      Overview In some cases, as a result of Replication, in addition to the main tables (for example, dbo.Account), empty additional tables are created in the database with names like: dbo.Account_2ade4447_5e11_4308_9e81_5eab62d9ed52 ...
    • Skyvia Full (Initial) Replication

      Overview Full Replication creates a complete copy of your source data in the target database. Use it for the first replication run, after schema changes, when refreshing all data, or if you encounter duplicate records. Requirements Valid Source and ...
    • Advantages of the New Replication Runtime

      Overview The new Replication runtime introduces significant improvements over the old runtime in terms of performance, flexibility, and error handling. You can enable it by selecting Use new runtime in your Replication integration settings. Key ...