Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Added MAX_HEAP_SIZE_MB to avoid a calculated size being too large #196

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Apr 30, 2019

When deployed on systems with large available memory, the automatic calculated heap size may be too large for the JVM.
This PR applies a limit to the calculated heap size.

@meltsufin
Copy link
Member

@gregw Why is setting HEAP_SIZE_MB directly or adjusting the ratio not sufficient?

@gregw
Copy link
Contributor Author

gregw commented May 1, 2019

@meltsufin I think the image should work out of the box on all reasonable containers. Currently I can't even build on a machine with 32GB because the tests fail because they try to start a JVM with a too large heap.
If we are setting the heap size by heuristics, then those heuristics should always result in a legal sensible heap size. Overriding values should only be needed if you want a very specific configuration.

edit: for example the jetty-runtime tests are failing on my machine with a too large heap, so I manually set a heap size of 4096, which then breaks on the CI machines as too large for them.

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

Successfully merging this pull request may close these issues.

2 participants