twolfson / grunt-zip

Zip and unzip files via a grunt plugin
MIT License
87 stars 19 forks source link

FATAL ERROR: JS Allocation failed - process out of memory #18

Open jblaker opened 10 years ago

jblaker commented 10 years ago

Getting the error: "FATAL ERROR: JS Allocation failed - process out of memory" when trying to zip up ~400MB of video files.

Was using grunt-contrib-compress prior to grunt-zip but it wasn't flexible enough so I switched. Thing is grunt-contrib-compress had no problem zipping up the files so it isn't a memory issue (I have 8GBs).

twolfson commented 10 years ago

This probably is a memory issue. node-zip isn't a streaming API so all the information is loaded into memory and manipulated there. There seems to be another grunt plugin which uses a streaming flavor, can you try that one out?

https://npmjs.org/package/grunt-zipstream

jblaker commented 10 years ago

Yeah that works but doesn't give me the routing functionality that your most excellent plugin does. I'll keep looking around. Thanks!

twolfson commented 10 years ago

Ah, I see. I will leave this issue open but I cannot make any promises of when I will be able to get to it.

Marshallx commented 10 years ago

Same problem trying to unzip a 4MB exe from a 17MB zip file.

Rudloff commented 7 years ago

Any news on this? It uses a lot of RAM (> 8 GB) when trying to unzip a 400 MB zip file.

twolfson commented 7 years ago

@Rudloff As suggested in https://github.com/twolfson/grunt-zip/issues/18#issuecomment-25671629, please try out a streaming ZIP plugin like grunt-zipstream. It looks like node-zip still doesn't support streams =/

https://npmjs.org/package/grunt-zipstream