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

Add launcher wrapper to set memory usage #129

Open
o0101 opened this issue Sep 12, 2022 · 0 comments
Open

Add launcher wrapper to set memory usage #129

o0101 opened this issue Sep 12, 2022 · 0 comments

Comments

@o0101
Copy link
Collaborator

o0101 commented Sep 12, 2022

I've seen an era where sometimes the node process will run out of space on the heap. As long as those memory available this can be solved by using the command line parameter Max old space size.

In order to do the simplest change that will bring this ability to the binary as well as, the the npm global install versions, a rapper file that becomes the new launcher file for the application is a good idea. The wrapper file can then spawn a new node process with the correct come online arguments.

Also we want to set the max old space size to a value that depends on the memory available in the system. Say 80% of the available memory. We can compute this using shell script functions but they may not be portable across different platforms. So we can probably compute it using node internal functions and properties itself another reason why a wrapper launcher script to launch the actual application and set that come online parameter to an amount of memory that depends on the actual memory available to the system is a good idea.

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

1 participant