Heap dump
This brief article explains how to obtain a heap dump from a running Ember docker container.
Step 0: Ensure you have enough disk space. Heap dump may take few gigabytes of disk space (up to maximum heap size available to Ember). Remember to keep some extra free space for Ember journal.
Step 1: Attach to Ember container:
docker compose exec -it ember /bin/sh
A running Ember container usually have $EMBER_WORK directory mapped to writable directory on the host file system.
Step 2. Obtain a heap dump. Usually each container runs Ember using PID 1 (you can verify this using jps
command). To obtain a heap dump, run
jmap -dump:format=b,file=$EMBER_WORK/ember-heapdump.hprof 1
Step 3. Exit Ember container, and download heap dump from the directory mapped to ember work (it is usually ./ember/work
subdirectory).
Don't forget to delete heap dump from host after you done.