[英]How to get heap dump from aws elastic beanstalk environment
We are getting OutOfMemoryError from a spring boot application running inside tomcat container hosted in aws elastic beanstalk. 我们从在aws弹性beanstalk中托管的tomcat容器内运行的spring启动应用程序获取OutOfMemoryError。 So how do i get heap dump from elastic beanstalk ? 那么我如何从弹性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? https://stackoverflow.com/a/48110954/7024630上面的答案提出了一种方法,通过安装第三方依赖来获取堆转储,有没有办法直接从AWS Elastic Beanstalk获取?
Try this Best method for inspecting Elastic Beanstalk JVM heap , it's worked for me. 尝试使用此Best方法检查Elastic Beanstalk JVM堆 ,它对我有用 。
In my case, I using a java 7: 就我而言,我使用的是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 xxxxxxxxxxxxx@x.y.z.w:~/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.