Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

Table of Contents

Summary

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

Benefits of new approach:

...

Two approaches:

  1. Manual - this step takes advantage of the heapdump script that is deployed in every docker container.
    1. Faster, less steps than before
    2. No need to do multiple SCPs from different instances as heap dump will go strait to S3 bucket

...

  1. Automated: fse-collect-heapdump job

Flow

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

...

Code Block
languagebash
themeMidnight
titleSSH 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 

Code Block
iconfalse
languagebash
themeMidnight
titledocker ssh
docker exec -it {dockerID} /bin/bash


5. Inside entry point (default entry folder) run

Code Block
themeMidnight
titleheap Dumping
 jmap -dump:format=b,file=mod-oai-pmh.hprof PID

...

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

FSE Jenkins Job

Alternatively one can use the FSE Jenkins job, fse-collect-heapdump, to collect heap dumps of one or multiple modules at a time. Access will be needed to work with this job.