简体   繁体   English

如何从aws弹性beanstalk环境中获取堆转储

[英]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.

相关问题 AWS-带$的Elastic Beanstalk环境属性 - AWS - Elastic Beanstalk Environment properties with a $ 如何从适用于Java的AWS开发工具包克隆Elastic Beanstalk环境? - How can I clone an Elastic Beanstalk environment from the AWS SDK for Java? 如何在AWS Elastic Beanstalk环境中配置负载均衡器? - How do I configure a load balancer in an AWS Elastic Beanstalk environment? AWS Elastic Beanstalk 环境变量编码和字符集 - AWS Elastic Beanstalk environment variable encoding and charset 如何从AWS Elastic Beanstalk连接到Google Cloud SQL实例 - How to connect to a google cloud sql instance from AWS elastic beanstalk 如何为运行 Java 应用程序的多 docker 容器 AWS Elastic Beanstalk 环境动态分配内存 - How to dynamically allocate memory to multi-docker container AWS Elastic Beanstalk environment running Java applications 如何在AdoptOpenJDK中获得堆转储? - How to get heap dump in AdoptOpenJDK? AWS Elastic Beanstalk缓存? - AWS Elastic Beanstalk caching? 如何使用附加到 Elastic Beanstalk 环境的 RDS 环境属性 - Java - How to use RDS environment properties attached to Elastic Beanstalk Environment - Java 如何使用 jmap 从 Kubernetes Pod 获取 Java 堆转储? - How to get Java Heap Dump from a Kubernetes Pod using jmap?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM