node-archiver: Corrupt zip files
I’m having issues identical to those in #32 (using archiver 0.15.1). Generating zips in production (I can’t repro on a dev machine) sometimes get corrupted. As mentioned in #32 the file sizes are always exactly the same and the corruption is inconsistent (different files get corrupted on different attempts).
I’ve tried disabling compression entirely (setting the store
option to true) but still get CRC errors.
Any help would be greatly appreciated
Thanks!
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 24 (10 by maintainers)
I’ve finally sorted this and it wasn’t, in fact, a problem with node/express/archiver at all. For those that are interested or maybe hitting similar problems I am using nginx as a reverse proxy/loadbalancer in front of my node instances. It turns out that by default nginx buffers the responses from the origin server before sending them onto the client. It looks like this was causing problems when proxying large responses. Disabling this feature by setting
proxy_buffering off;
seems to have fixed the problem.Thanks for your help with this!