mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 00:56:13 +01:00
feat: add expose-gc flag to loader
This commit is contained in:
@@ -102,6 +102,9 @@ function forkWorker(index, isPrimary) {
|
|||||||
if (nconf.get('max-memory')) {
|
if (nconf.get('max-memory')) {
|
||||||
args.push(`--max-old-space-size=${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]) {
|
if (!ports[index]) {
|
||||||
return console.log(`[cluster] invalid port for worker : ${index} ports: ${ports.length}`);
|
return console.log(`[cluster] invalid port for worker : ${index} ports: ${ports.length}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user