From 137c6428e8b2cc7b55e006909b593ca4bdd564b2 Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Tue, 16 Jan 2018 11:53:23 +0100 Subject: [PATCH] Introducing heapdump to allow collecting more data from the server --- config.example.js | 7 +++++++ package.json | 1 + 2 files changed, 8 insertions(+) diff --git a/config.example.js b/config.example.js index 6d1104497..bcc7a6773 100644 --- a/config.example.js +++ b/config.example.js @@ -3,6 +3,13 @@ globals module */ var domain = ' http://localhost:3000/'; + +// You can `kill -USR2` the node process and it will write out a heap dump. +// If your system doesn't support dumping, comment this out and install with +// `npm install --production` +// See: https://strongloop.github.io/strongloop.com/strongblog/how-to-heap-snapshots/ +require('heapdump'); + module.exports = { // the address you want to bind to, :: means all ipv4 and ipv6 addresses diff --git a/package.json b/package.json index e6862775b..d3e44d0a7 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ }, "devDependencies": { "flow-bin": "^0.59.0", + "heapdump": "^0.3.9", "jshint": "~2.9.1", "less": "2.7.1", "lesshint": "^4.5.0",