Skip to content
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

[BUG] NPM 7 frequently causing EMFILE error when building image in Quay.io #2977

Closed
mfshao opened this issue Mar 28, 2021 · 2 comments
Closed
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@mfshao
Copy link

mfshao commented Mar 28, 2021

Not sure if this is a bug or a design/improvement of NPM 7 against NPM 6. But looks like NPM 7 would open more file descriptors and/or sockets when doing npm i comparing to NPM 6?

Current Behavior:

We noticed after migrating to NPM 7, our image build in Quay.io is much more frequently to fail with EMFILE error than before (using NPM 6).

In order to stabilize the build, we have reduce the maxsocket by a lot, now we are seting npm config set maxsockets=5 in our dockerfile.

If we downgrade back to NPM 6, our Quay.io builds runs fine with the default maxsockets=50 value.

Expected Behavior:

Image build in Quay.io using NPM 7 should be stable to success with the default config (or with maxsockets=50, which is the same value as for NPM 6)

Environment:

  • OS: Ubuntu 20.04 as base image
  • Node: 14.16.0
  • npm: 7.7.5
@mfshao mfshao added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Mar 28, 2021
@darcyclarke
Copy link
Contributor

darcyclarke commented Mar 28, 2021

@mfshao is there any way you can provide a minimal reproduction case for this error? Sounds like this may be intermittant which would understandably be hard to reproduce but even if you could help in setting up a project with similar constratins to those of Quay.io it would help track down the problematic code paths. seems like this may be linked to this other issues just filed: #2978

@darcyclarke darcyclarke removed the Needs Triage needs review for next steps label Mar 28, 2021
@ruyadorno
Copy link
Contributor

Linked issue has been resolved in npm@7.7.6 - let us know if you still see any problems! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

3 participants