java-buildpack: java-buildpack incompatible with the use of cf scale -MEMORY cmd
The java-buildpack statically applies memory heuristics at staging time, i.e. includes the -Xmx option in the start cmd. As a result, if a user is using the cf scale -memory command to decrease the memory, the JVM will still try to allocate up to the initial memory account. The jvm will then exceed the memory limit and be killed by the warden container.
Possible workaround: apply the memory heuristics within the droplet using the http://docs.cloudfoundry.com/docs/using/deploying-apps/environment-variable.html#VCAP_APPLICATION limits entry.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 21 (15 by maintainers)
Commits related to this issue
- # This is a combination of 9 commits. # This is the 1st commit message: Initial check in of Sealights Buildpack # This is the commit message #2: Add logs to SealightsAgent # This is the commit mes... — committed to nadavye/java-buildpack by deleted user 3 years ago
- # This is a combination of 11 commits. # This is the 1st commit message: Initial check in of Sealights Buildpack # This is the commit message #2: Add logs to SealightsAgent # This is the commit me... — committed to nadavye/java-buildpack by deleted user 3 years ago
- # This is a combination of 14 commits. # This is the 1st commit message: Initial check in of Sealights Buildpack # This is the commit message #2: Add logs to SealightsAgent # This is the commit me... — committed to nadavye/java-buildpack by deleted user 3 years ago
@nebhale We’re implementing some auto-scale behaviour and ran into this restage issue again. It is one thing to know you must restage when scaling a java app via the CLI. But when a user is setting up auto scale rules, asking them to restage or restart depending on the buildpack used is yet another annoying side effect of staging time memory heuristics.
I’ve never been a fan of this behaviour and the complexities it propagates to the user. Auto scale rules is yet another example of this complexity pushed to the user. I hope that you guys haven’t given up completely on a startup time memory heuristics solution sometime in the future.