From f37946118cf8799f3881129a09934c5272b1e5e6 Mon Sep 17 00:00:00 2001 From: wiz Date: Sun, 5 Mar 2023 15:45:28 +0900 Subject: [PATCH] Change heap size warning to 80% utilization --- backend/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index f2b845ea1..fbe9c08c2 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -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));