Skip to end of banner
Go to start of banner

Take heap dump

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Summary 

This document contains step-by-step flow how to effectively and fast take a heap dump from folio modules.

Benefits of new approach:

  • Faster
  • less steps
  • No need to do multiple SCPs from different instances as heap dump will go strait to S3 bucket
  • Can be automated in future


Flow

  1. Check EC2 instance where particular docker container is located by clicking on service task in ECS service:


2. Connect to EC2 instance via SSH with command like

SSH command
ssh -i "folio-int.pem" ec2-user@{IP}

3. Do Docker ps and grab id of needed container;

4. SSH inside container by command 

docker ssh
docker exec -it {dockerID} /bin/bash


5. Inside entry point (default entry folder) run

heap Dumping
 jmap -dump:format=b,file=mod-oai-pmh.hprof PID

   a. Name of .hprof file matters. It should be name of service without "-b" postfix. (also you can check how to give a name to this file you can open heapdump.sh script and check one of the last lines it contains proper  name of the file);

   b. To get PID (process ID of the java process) run top command and check java PID.

6. After #5 command will generate .hprof file run 

send to S3
bash heapdump.sh


7. This command will zip heap dump and sent it to appropriate S3 bucket in heap folder





  • No labels