Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3 file reader cannot process JSON files over 512MB #775

Open
ciorg opened this issue Oct 21, 2022 · 0 comments
Open

s3 file reader cannot process JSON files over 512MB #775

ciorg opened this issue Oct 21, 2022 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@ciorg
Copy link
Member

ciorg commented Oct 21, 2022

I think very large JSON files are not ideal for many reasons, but that being said there may be methods we could implement to accommodate large JSON files if we need to.

The 512MB string size limit is a hard limit in Node.js and when our processor reads the JSON file it accumulates all the chunks into a string to then parse to JSON, but with large files I get this error:

"error": "TSError: Cannot create a string longer than 0x1fffffe8 characters\n 

We could try something like - https://www.npmjs.com/package/stream-json to stream process json files, or there are other streaming options.

This tickets lists some more options - https://stackoverflow.com/questions/68230031/cannot-create-a-string-longer-than-0x1fffffe8-characters-in-json-parse.

At the very least we should add a better error explanation.

@ciorg ciorg added bug Something isn't working enhancement New feature or request labels Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant