Memory Dump

To troubleshoot memory related issues, Super-admin can get a memory dump of NotifyBC by querying /memory API end point. For example

$ curl -s http://localhost:3000/api/memory
Heap.20240513.114015.22037.0.001.heapsnapshot

The output is the file name of the memory dump. The dump file can be loaded by, for example, Chrome DevTools.

fileName query parameter can be used to specify the file path and name

$ curl -s http://localhost:3000/api/memory?fileName=/tmp/my.heapsnapshot
/tmp/my.heapsnapshot

How to get memory dump of a particular node?

If you call /memory from a client-facing URL end point, which is usually load balanced, the memory dump occurs only on node handling your request. To perform it on the node you want to troubleshoot, in particular the master node, run the command from the node. Make sure 127.0.0.1 is in adminIps.