-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Memory Allocation Failure When Handling Large JSON with Wazero (32 MB Limit) #102
Comments
My understanding is that Wazero allocates memory in 64 KB pages, growing up to the 4 GB max allowed in a single WASM memory - unless constraint by Where did you read that it is limited to 32 MB? |
I set that limit in code explicitly "WithMemoryLimitPages" |
@snaffi, I'll take a look in a moment. Do you have a public repo where I can reproduce? If not I can just do it locally |
Unfortunately it's in private repo 😖 Code is also complex ... I'll try to provide simplified version by the end of the day |
Thanks man 👍🏻 |
Hello @JairusSW output JSON output models |
@snaffi, thanks. I'll take a look as soon as I'm out of classes |
It's fixed as of |
Hello,
My WASM scripts handle large JSON data—often several megabytes—and produce even larger JSON files.
I'm using wazero as the runtime, but it's limited to 32 MB.
I’ve encountered a problem where the serializer fails because it can’t allocate enough memory.
The only memory limit that works for me is 256 MB, but that’s too large—allocating ~256 MB for each operation is not ideal.
Input JSON size
2,195,285
2.19.mbOutput JSON size
11,535,277
11.53mbThe text was updated successfully, but these errors were encountered: