Memory Calculator doesn't recognize max
memory value under cgroupsv2
#176
Labels
type:bug
A general bug
max
memory value under cgroupsv2
#176
What happened?
When running a container built with
paketo-buildpacks/java
on a system that uses cgroupsv2 and no memory limit is set, then you will see the following message:Followed by...
What's happening is that when there is no memory limit set, the literal value in
/sys/fs/cgroup/memory.max
ismax
. The buildpack doesn't presently understand this so it tries to parse it as value and fails. That generates the first error.The buildpack then goes and reads
/proc/meminfo
, which it does successfully, and picks out the value listed in the messageCalculating JVM memory based on...
.This generally works out OK because there is no container memory limit set and the memory calculator will essentially use all of the memory on the system. At the same time, the error message is confusing and we can improve the situation.
This PR is for the memory calculator to recognize the option
max
and use all available memory when that is the case.The text was updated successfully, but these errors were encountered: