ConSol / sakuli

Sakuli is an end-2-end testing and monitoring tool for web sites and common UIs with multiple monitoring integrations
http://www.sakuli.org
118 stars 29 forks source link

consol/sakuli-ubuntu-xfce fails with calculated JVM_HEAP_XMX 0 MB is too small #280

Closed sni closed 6 years ago

sni commented 7 years ago
USER_ID: 1984, GROUP_ID: 0
nss_wrapper location: /usr/lib/libnss_wrapper.so
CGROUPS_MEM: 18446744073709551615 bytes, 0 MB
MEMINFO_MEM: 16730763264 bytes, 15955 MB
MEM: -1 bytes, 0 MB
JVM_HEAP_RATIO 0.5 of MEM 0 MB
calculated JVM_HEAP_XMX 0 MB is too small, try to use at the JVM_HEAP_XMX_MIN (300 MB)
Container need at least 300 MB memory for the JVM! Stop container starup!

The reason seems to be, that https://github.com/ConSol/sakuli/blob/dev/docker/sakuli-client/src/common/scripts/jvm_options.sh uses bash arithmetics which are bound to LONG_MAX.

%> perl -MPOSIX -le 'print LONG_MAX'
9223372036854775807
%> cat /sys/fs/cgroup/memory/memory.limit_in_bytes
18446744073709551615

Workaround: Add ENV JVM_HEAP_XMX 512 to Dockerfile.

toschneck commented 6 years ago

also relevant for #240