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

Bz1464020 fix memory definition #20

Merged

Conversation

jcantrill
Copy link
Contributor

This PR fixes bz1464020 to supply memory limits to the node run time. Changing to underscore from dashes based on grep'ing the code and:

[1] nodejs/node#7937
[2] elastic/kibana#9006

@jcantrill jcantrill requested a review from richm June 28, 2017 21:53
@jcantrill jcantrill force-pushed the bz1464020_fix_memory_definition branch from bf1c51d to 1be8b2f Compare June 28, 2017 21:55
run.sh Outdated
@@ -30,8 +30,7 @@ if echo "${OCP_AUTH_PROXY_MEMORY_LIMIT:-}" | grep -qE "^([[:digit:]]+)([GgMm])?i
num="${DEFAULT_MIN}"
fi

NODE_OPTIONS="--max-old-space-size=$((num / BYTES_PER_MEG))"
export NODE_OPTIONS
export NODE_OPTIONS="--max_old_space_size=$((num / ${BYTES_PER_MEG}))"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might I make a simple suggestion that will allow passing in node options from the dc:

export NODE_OPTIONS="${NODE_OPTIONS:---max_old_space_size=$((num / ${BYTES_PER_MEG}))}"

Then users can set NODE_OPTIONS in the env. in the dc to override this and/or provide additional options.

@jcantrill jcantrill force-pushed the bz1464020_fix_memory_definition branch from 1be8b2f to 84deaa0 Compare June 29, 2017 17:34
Copy link

@richm richm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ship it

@jcantrill jcantrill force-pushed the bz1464020_fix_memory_definition branch from 84deaa0 to 8440ec4 Compare June 29, 2017 17:46
@jcantrill jcantrill merged commit 684693a into fabric8io:master Jun 29, 2017
@jcantrill jcantrill deleted the bz1464020_fix_memory_definition branch June 29, 2017 17:47
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

Successfully merging this pull request may close these issues.

2 participants