Skip to content

Cannot retrieve a big field #922

Closed
Closed
@antoinegomez

Description

@antoinegomez

Hello!

I am stuck while trying to load data from a table with a big field.
The size of the field content is about 22MB. The data is stored in base64.

The field is a LONGTEXT, I also tested with a LONGBLOB but same result: the output is a 100 char. long base64. Once decoded it looks like non printable/binary data.

I use Knex.js but it use this driver. And I also tested with it: same problem.

I can insert data in the table, so the max packet size option on mysql server seems ok.

Tried to retrieve data with streams and it produced the same error.
Tested on two machines using GNU/Linux and mysql >5.5.

I managed to reproduced it generating a random string of >22MB and then trying to get it back.
Also tested with smaller data and found out it started to stop retrieving data between 16-17MB.

How can I and what is the best way to retrieve such big data from mysql with nodejs ?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions