0

We run our Java application in k8s, using Docker as the container runtime, and when memory leak occurs, the application crash. So for troubleshooting we take heap dumps by setting -XX:HeapDumpPath=/home/dump.hprof" , but as the container crashes we lose the file and are not able to get it.

One solution we got was before the container crashes, ie the kill signal is parsed to docker for killing the container, we push the file to s3.
Another was mount a volume to pod and specify the path to save the file.

Are there any alternative solutions for this?

srethomas
  • 1
  • 5
  • The heapdump path must be a mounted directory.That way whenever the app crashes , HeapDump will be written outside the container and will exist after the container's lifecycle. – Rambler Mar 21 '22 at 21:26
  • The linked question briefly describes approaches of using EBS or EFS volumes to hold the heap dumps. – David Maze Mar 21 '22 at 21:32

0 Answers0