Skip to content
Discussion options

You must be logged in to vote

Thanks for the detailed questions. There are two separate issues here, so I'd handle them independently.

1. Memory & concurrency

NODE_OPTIONS="--max-old-space-size=4096" is a reasonable way to increase the V8 heap limit when Node is hitting OOM errors, but it doesn't necessarily prevent memory spikes by itself.

If the issue is related to npm's network concurrency, you can also limit the number of sockets used during installation:

npm ci --maxsockets=5

This can help reduce concurrent network activity and the associated memory pressure, especially in resource-constrained or isolated Docker runners.

One important caveat: make sure the container actually has enough memory available. Setting -…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@mehdiemamhadi
Comment options

Answer selected by mehdiemamhadi

This comment was marked as low quality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
npm
Labels
Question Ask and answer questions about GitHub features and usage npm Discussions around programming langages, open source and software development Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates
3 participants