Recreate ConfigurableApplicationContext may cause OutOfMemory when using spring-boot-starter-actuator #19387
Labels
for: external-project
For an external project and not something we can fix
status: invalid
An issue that we don't feel is valid
I have a SpringBoot application using actuator, in my method update Context, I need to recreate ConfigurableApplicationContext in order to use the new properties updated in application.properties, because in SpringBoot actuator doesn’t have “refresh” endpoint.
In production this service may called only 1 time by week. After 3 mouths I got OOM.
After analyzing of headdump in prod, the problem came form io.micrometer using by actuator.
io.micrometer.core.instrument.binder.tomcat.TomcatMetrics
I created a demo project to isole le problem.
pom.xml
DemoApplication
MyController
using JVM option to give the problem faster -Xms128m -Xmx128m -XX:+HeapDumpOnOutOfMemoryError
Demo to download: http://qfdk.me/demo.zip
AutoCloseable may be to implement in TomcatMetrics
The text was updated successfully, but these errors were encountered: