I am running a Spring Boot service inside a Docker container and the serivce POM.xml
file has this plugin
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>
-Xms1024m
-Xmx3096m
-XX:+UseConcMarkSweepGC
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=logs/heapdump.bin
-XX:+PrintGCDetails
-Xloggc:logs/data-pipeline-automation-gc.log
-XX:NativeMemoryTracking=summary
-XX:+CrashOnOutOfMemoryError
-XX:ErrorFile=logs/crashDump.log
</jvmArguments>
</configuration>
</plugin>
I see my service getting an OOM but I don't get the heapdump.bin
or the GC logs.
This is my configuration in log4j2.xml for springframework logs
<AppenderRef ref="Console" />
<AppenderRef ref="RollingFile" />
</Logger>
So I get the logs created and dumped into /logs folder in the Docker container, but I don't the heapdump.bin file. I am putting it in logs because this is mounted on VM, hence we can access this folder contents from outside access.
Can someone please point out the issue here? I at least need the GC logs to verify the issue.