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

No documentation of crucial setting MEMORY_LIMIT #576

Open
macrel opened this issue Oct 14, 2022 · 0 comments
Open

No documentation of crucial setting MEMORY_LIMIT #576

macrel opened this issue Oct 14, 2022 · 0 comments

Comments

@macrel
Copy link

macrel commented Oct 14, 2022

I was running into issues while tuning XMS and XMS javaopts (Heap Size) because it was being reset to a low number (256MB I beleive).

Long story short: please update the documentation to explain the MEMORY_LIMIT environment variable setting as this is hugely importand for any serious project that wants to modify heap_size.

More info:
For our environment 256M heap size is way too low. So I setup a VM with 6GB memory and the container was allocated all memory. I wanted to set my heap_size to 4GB.

After starting up the docker container there was an error logged "The specified heap size XXX is larger than the maximum memory of the container (1024M)". Since I am running a docker container I obviously thought there must be something with the allocated memory for my docker container (as I knew of the memory parameter 'docker run --memory...') however that was not the case as docker stats showed me there was 10GB memory allocated.

It took me quite some time and headache to figure out that this 1024M is not a limit on my container at all, but a default limit in the CF buildpack..! I refer to the file java.py , line 291. Then reading the code in this file I see something about an environment variable "MEMORY_LIMIT" to override this default. So I added this env. variable and my problems were fixed.

Please add this to the documentation as I think it's crucial information.

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