Change heap size warning to 80% utilization

This commit is contained in:
wiz
2023-03-05 15:45:28 +09:00
committed by GitHub
parent 9eeaf76369
commit f37946118c

View File

@@ -269,7 +269,7 @@ class Server {
const now = Date.now();
const stats = v8.getHeapStatistics();
this.maxHeapSize = Math.max(stats.used_heap_size, this.maxHeapSize);
const warnThreshold = 0.95 * stats.heap_size_limit;
const warnThreshold = 0.8 * stats.heap_size_limit;
const byteUnits = getBytesUnit(Math.max(this.maxHeapSize, stats.heap_size_limit));