Is there a 64kb Repo.Insert limit?

Is there a limit to the amount of data that can be inserted to a database (mysql) of column type longtext? I am trying to insert string data and noticed Repo.insert doesn’t insert more than 64kb of string data.

It seems that driver continues to assume that the data is type of textnot longtext. So either this is bug in driver or you forgot to run migration.

2 Likes

In the mysql DB, the column type is longtext. Could the cause be something else, such as setting a vm argument when starting the server?

In the migration files, the type is set to text and a size of 4gb, which myxql translates to longtext (based on the column type)

The server is running Erlang/OTP 24 64 bit. This should mean the ‘size of binary’ shouldn’t affect the issue I’m having?

In the 32-bit implementation of Erlang, 536,870,911 bytes is the largest binary that can be constructed or matched using the bit syntax. In the 64-bit implementation, the maximum size is 2,305,843,009,213,693,951 bytes. If the limit is exceeded, bit syntax construction fails with a system_limit exception, while any attempt to match a binary that is too large fails. This limit is enforced starting in R11B-4.
In earlier Erlang/OTP releases, operations on too large binaries in general either fail or give incorrect results. In future releases, other operations that create binaries (such as list_to_binary/1) will probably also enforce the same limit.

figured it out. There was a bug with the driver.