I've been running my containerized Spring Boot app on AWS Elastic Container Service for months without any issues. Yesterday, out of nowhere, newly started containers began to fail due to the memory calculator being unable to calculate the memory configuration:
2023-06-28T12:21:32.605Z Setting Active Processor Count to 2
2023-06-28T12:21:32.878Z Calculating JVM memory based on 619708K available memory
2023-06-28T12:21:32.878Z For more information on this calculation, see https://paketo.io/docs/reference/java-reference/#memory-calculator
2023-06-28T12:21:32.878Z unable to calculate memory configuration
2023-06-28T12:21:32.878Z fixed memory regions require 635118K which is greater than 619708K available for allocation: -XX:MaxDirectMemorySize=10M, -XX:MaxMetaspaceSize=123118K, -XX:ReservedCodeCacheSize=240M, -Xss1M * 250 threads
2023-06-28T12:21:32.879Z [31;1mERROR: [0mfailed to launch: exec.d: failed to execute exec.d file at path '/layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/memory-calculator': exit status 1
I obviously built the container image using the Spring Boot Maven plugin (spring-boot:build-image
) and have been running this very image version for many weeks w/o problems.
Why is the memory calculator suddenly unable to calculate the memory config when it was able to do so multiple times before? Naturally, the container configuration/task definition didn't change...