Replies: 1 comment 1 reply
-
There are configuration settings to adjust the metaspace calculations.
https://github.com/paketo-buildpacks/bellsoft-liberica#configuration
https://github.com/paketo-buildpacks/libjvm/blob/main/helper/memory_calculator.go#L126
I would recommend option 2.) and just increase by 20 or 30% and see if that stabilizes your app. That is likely better long run because if your class count does change, it'll adjust dynamically. That said, you can also just figure out what you need to stabilize the app and set that specific value, i.e. option 3.). I would avoid option 1.) and am just documenting that to be complete. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Hi, we recently switch our way of building spring boot docker image using paketo (which is come with spring boot maven plugin).
But the -XX:MaxMetaspaceSize calculated by the memory calculator is a little bit small for our application and causing a lot of OutOfMemoryError: Metaspace. And with the -XX:+ExitOnOutOfMemoryError flag contribute by the java pack, our component shut down and get restart (since it is deployed inside a k8s cluster) a lot.
We monitored our component and the metaspace size is stable after some code execution path so there should be no memory leak.
Can we somehow provide a way customize/choose our own flag instead of sticking with what provided by the memory calculator?
Also, we cannot observe and tune all of our components and set a custom value for -XX:MaxMetaspaceSize since it's kind of an exhaustive task.
Beta Was this translation helpful? Give feedback.
All reactions