On a OpenShift 3.11 running app, I am trying to get a HeapDump because I suspect an OOM on my pods.
My app runs on 14 replicas and i want to append the following configuration to the Java Options
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=file:///my/path/jdump/
the path is on an external mounted volume.
Now I know that the default filename will be
java_pid1.hprof
but from a
ps -ef | grep java
i noticed that most the pods use the same pid for the process, and I fear that if a OOM occurs on more than one pod at the same time I will get a problem with a contemporary access and write to the file.
Is there a way to parametrize the filename? I imagine something like
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=file:///my/path/jdump/{$podname}_dump.href
thanx a lot for your kind answers