Reputation: 33
We are getting OutOfMemoryError from a spring boot application running inside tomcat container hosted in aws elastic beanstalk. So how do i get heap dump from elastic beanstalk ?
https://stackoverflow.com/a/48110954/7024630 The above answer suggests a method by installing third-party dependency to get heap dump, is there any way around to get directly from AWS Elastic Beanstalk?
Upvotes: 0
Views: 1487
Reputation: 3
Try this Best method for inspecting Elastic Beanstalk JVM heap, it's worked for me.
In my case, I using a java 7:
$ which java
$ ls -lh /usr/bin/java
$ yum install java-1.7.0-openjdk-devel
$ yum --enablerepo='*-debug*' install java-1.7.0-openjdk-debuginfo
$ ps aux | grep tomcat
$ sudo -u tomcat jmap -dump:live,file=/tmp/test.hprof 12768
$ tar -czvf test.hprof.tar.gz /tmp/test.hprof
$ scp test.hprof.tar.gz [email protected]:~/
Upvotes: 0