( persicsb | 2020. 05. 21., cs – 11:05 )

Nem tudom amúgy, hogy Java 11 óta, ha HotSpotot használsz, mi a probléma. Java 11 óta a VM felismeri, hogy konténerben fut, és eszerint viselkedik - figyelembe veszi a konténer memória és CPU korlátait. Ezt expliciten kell kikapcsolnod, lád a -XX:-UseContainerSupport kapcsolót. Hátrány, hogy ez csak Linux és x64 környezetben értelmezett.

 

The VM now provides automatic container detection support, which allows the VM to determine the amount of memory and number of processors that are available to a Java process running in docker containers. It uses this information to allocate system resources. This support is only available on Linux x64 platforms. If supported, the default for this flag is true, and container support is enabled by default. It can be disabled with -XX:-UseContainerSupport.