diff --git a/.github/values.ocp4.dev.yaml.gpg b/.github/values.ocp4.dev.yaml.gpg index bbf08d6c8..b32edc79a 100644 Binary files a/.github/values.ocp4.dev.yaml.gpg and b/.github/values.ocp4.dev.yaml.gpg differ diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 935029967..f519a9df9 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -147,6 +147,7 @@ export default defineUserConfig({ text: 'Miscellaneous', children: [ '/docs/health-check/', + '/docs/memory-dump/', '/docs/benchmarks/', '/docs/bulk-import/', '/docs/developer-notes/', diff --git a/docs/docs/miscellaneous/memory-dump.md b/docs/docs/miscellaneous/memory-dump.md new file mode 100644 index 000000000..38c8b175b --- /dev/null +++ b/docs/docs/miscellaneous/memory-dump.md @@ -0,0 +1,24 @@ +--- +permalink: /docs/memory-dump/ +--- + +# Memory Dump + +To troubleshoot memory related issues, Super-admin can get a memory dump of _NotifyBC_ by querying `/memory` API end point. For example + +```sh +$ 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 + +```sh +$ curl -s http://localhost:3000/api/memory?fileName=/tmp/my.heapsnapshot +/tmp/my.heapsnapshot +``` + +::: tip 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_. diff --git a/package.json b/package.json index 4a0a5a448..e4e001085 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notify-bc", - "version": "5.1.1", + "version": "5.1.2", "dbSchemaVersion": "0.9.0", "description": "A versatile notification API server", "author": "f-w",