Vscode: Packaging v1.22.1 on Arch Linux results in "EMFILE: too many open files"

Created on 8 Apr 2018  路  7Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.22.1
  • OS Version: Arch Linux

Steps to Reproduce:

  1. Download v1.22.1 from the Releases section.
  2. Run yarn to install all dependencies.
  3. Run gulp vscode-linux-x64 or gulp vscode-linux-x64-min


Does this issue occur when all extensions are disabled?: N/A

The issue occurs after Starting 'vscode-linux-x64'... is shown. The actual error message is:

events.js:165
      throw er; // Unhandled 'error' event
      ^

Error: EMFILE: too many open files, open '/home/mjg/Downloads/vscode-1.22.1/extensions/json-language-features/node_modules/applicationinsights/out/AutoCollection/diagnostic-channel/postgres.sub.js'
Emitted 'error' event at:
    at fs.js:2066:12
    at FSReqWrap.oncomplete (fs.js:153:20)

The issue has been reproduced among both my Arch Linux machines. Another issue was seen with the machine of the package maintainer for this repository on the Arch Linux User Repository:

[10:08:12] Finished 'optimize-vscode' after 22 s
[10:08:12] Starting 'vscode-linux-x64'...
internal/streams/legacy.js:57
      throw er; // Unhandled stream error in pipe.
      ^

Error: connect ECONNRESET 13.107.6.175:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1174:14)
install-update

Most helpful comment

It seems a bit odd to dismiss this as a node issue when 1.21 builds fine with a file ulimit of only 1024 files, but I needed close to 10K open files for building 1.22... Nonetheless, 1.22.1 does build with the higher limit.

All 7 comments

The issue can be reproduced on version 1.22.0 as well.

A similar issue can be reproduced on release/1.21, Win 7, when packaging the json extension.

It seems a bit odd to dismiss this as a node issue when 1.21 builds fine with a file ulimit of only 1024 files, but I needed close to 10K open files for building 1.22... Nonetheless, 1.22.1 does build with the higher limit.

I鈥檓 facing this same issue, and it鈥檚 happening statring from 1.22.0. It builds just fine on 1.21.1. As said @zrax, VSCode is somehow responsible (or its dependencies, and therefore, itself) to handle this.

[鈥
events.js:165
      throw er; // Unhandled 'error' event
      ^
Error: EMFILE: too many open files, open '/home/myself/workspace/sandbox/vscode-1.22.0/extensions/json-language-features/node_modules/applicationinsights/out/AutoCollection/diagnostic-chanevents.js:165
nel/postgres.sub.d.ts'
Emitted 'error' event at:
    at fs.js:2066:12
    at FSReqWrap.oncomplete (fs.js:153:20)      throw er; // Unhandled 'error' event
      ^
Error: EMFILE: too many open files, open '/home/myself/workspace/sandbox/vscode-1.22.0/extensions/json-language-features/node_modules/applicationinsights/out/AutoCollection/diagnostic-channel/postgres.sub.d.ts'
Emitted 'error' event at:
    at fs.js:2066:12
    at FSReqWrap.oncomplete (fs.js:153:20)

Well I'm way more inclined to think this actually is a NodeJS issue, which happens to be "workaround-able" by changing the OS configuration, but this is not the place to discuss that.

So, for anyone interested in the workaround, I'm providing steps on how to increase the max open files limit on Linux+systemd at https://superuser.com/a/1322187/358758.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VitorLuizC picture VitorLuizC  路  3Comments

curtw picture curtw  路  3Comments

villiv picture villiv  路  3Comments

NikosEfthias picture NikosEfthias  路  3Comments

shanalikhan picture shanalikhan  路  3Comments