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

Option for limiting the number of workers? #1

Closed
fsouza opened this issue Nov 19, 2019 · 2 comments
Closed

Option for limiting the number of workers? #1

fsouza opened this issue Nov 19, 2019 · 2 comments

Comments

@fsouza
Copy link

fsouza commented Nov 19, 2019

Hey there, thanks for creating this project, it's really cool and extremely helpful.

We're trying to use nexe to bundle some of our tools and we're running into an issue when using it inside a container: the container runs out of memory due to the number of processes spawned (the host machine has 72 cores).

As you can see in nodejs/node#28765 and nodejs/node#28855, node's os.cpus doesn't really query the correct location on Linux and therefore can't get the number of available CPUs, so even though we're actually running the container with only 2 cores, nexe/resolve-dependencies still assumes 72 cores are available.

Would you be open to introducing an option in nexe and resolve-dependencies to limit the number of children spawned by the dependency resolution process? Or perhaps use a namespace-aware library for querying the number of available CPUs?

Thanks!

@calebboyd
Copy link
Member

Available in 3.0.3 by setting RESOLVE_DEPENDENCIES_CPUS environment variable.

@fsouza
Copy link
Author

fsouza commented Nov 19, 2019

@calebboyd ohhh my bad, thankssss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants