-
Notifications
You must be signed in to change notification settings - Fork 93
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
[canary] wasm - could not allocate memory #195
Comments
I tried to build @wasm/mozjpeg with MAXIMUM_MEMORY=4GB and it still throws the error and it's the maximum we can get. I think the problem is webpack processing all image imports in parallel, that with some cpu interrupts and it's populating the ram like crazy without it being capable to free the memory because the images are still being processed. I think we could fix the problem by processing a maximum of cpu threads + 1 number of images in parallel. This could be achieved with some kind of internal state in the loader where we keep track of the number of images currently processed, but i don't know if it's possible with webpack, i'll make some research. |
Can we get an official fix for this? happens to me as well |
Hi!
I have a lot of images, and i build a lot of variants for each image. And when i use the
optimize: true
option it takes a lot of time to optimize them and in the end it failsI think there is a limit to how much memory it can use.
My node version is 12.18.3
The text was updated successfully, but these errors were encountered: