diff --git a/loader.js b/loader.js index 8b25906452..a7817ac8b9 100644 --- a/loader.js +++ b/loader.js @@ -102,6 +102,9 @@ function forkWorker(index, isPrimary) { if (nconf.get('max-memory')) { args.push(`--max-old-space-size=${nconf.get('max-memory')}`); } + if (nconf.get('expose-gc')) { + args.push('--expose-gc'); + } if (!ports[index]) { return console.log(`[cluster] invalid port for worker : ${index} ports: ${ports.length}`); }