kevva / download

Download and extract files
MIT License
1.28k stars 200 forks source link

Error: file table overflow #119

Closed auschmann closed 7 years ago

auschmann commented 7 years ago

Hi,

i tried to download and unzip a zip package from our server.

Steps to reproduce:

I did the following:

  downloadUpdate() {
    const options = {
      extract: true
    };
    return download(`${BASE_URL}download`, `${Paths.getUpdateDir()}/update.zip`, options);
  }

What i expected:

I expected the file to be downloaded to the filepath /tmp/update.zip and the archive to be extracted.

What did actually happen:

The update.zip was downloaded and saved successfully. The zip is NOT extracted and the following error is thrown:

{ Error: ENFILE: file table overflow, open '/tmp/butler/update.zip/node_modules/babel-runtime/node_modules/core-js/library/fn/string/virtual/unescape-html.js'
    at Error (native)
  errno: -23,
  code: 'ENFILE',
  syscall: 'open',
  path: '/tmp/butler/update.zip/node_modules/babel-runtime/node_modules/core-js/library/fn/string/virtual/unescape-html.js' }

It seems like there are too many files in my zip archive?

JoseExposito commented 7 years ago

Same problem here. Apparently it happens on macOS: http://blog.mact.me/2014/10/22/yosemite-upgrade-changes-open-file-limit

There is an open pull request to fix this on decompress: https://github.com/kevva/decompress/issues/48

@kevva any plans to merge that?

sindresorhus commented 7 years ago

Merged https://github.com/kevva/decompress/pull/45