For more context, I have a simple spring boot app which I converted to an image using ./mvnw spring-boot:build-image
. This app relies on a MySQL to function. In my linode server, I have a docker compose that pull a MYSQL image and my project image from my docker registry. The issue now is when I pull my spring app image to start the container in my linode server, I get the error
backend | Calculating JVM memory based on 294380K available memory
backend | For more information on this calculation, see https://paketo.io/docs/reference/java-reference/#memory-calculator
backend | unable to calculate memory configuration
backend | fixed memory regions require 634727K which is greater than 294380K available for allocation: -XX:MaxDirectMemorySize=10M, -XX:MaxMetaspaceSize=122727K, -XX:ReservedCodeCacheSize=240M, -Xss1M * 250 threads
backend | ERROR: failed 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
Now I understand what and why this error is occurring, actually it is similar issue link only it is different cloud provider. I should also say I have verified I still have more than enough memory in my linode server.
|tmpfs |97M |97M |1% |/run |/dev/sda|25G |19G |20%|/ |tmpfs |485M|485M|0% |/dev/shm |tmpfs |5.0M|5.0M|0% |/run/lock |tmpfs |97M |97M |1% |/run/user/0
I do not want to write my own DockerFile for my application because it will not be as optimized as using build packs and I do not want to tune the memory calculator as it is not the a good solution as described in the link. I need help on how to solve this issue? Also below is what my build looks like in my pom.xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<name>docker.io/<username>/${project.artifactId}:latest</name>
</image>
</configuration>
</plugin>
</plugins>
</build>