Increase heap log size to five GB.

This commit is contained in:
Patrick Fic
2025-10-20 17:07:01 -07:00
parent 6d830ae98b
commit 7742d6f89f

View File

@@ -219,7 +219,7 @@ function ongoingMemoryDump() {
);
if (loggingEnabled) {
// Enforce heap snapshot folder size limit (< 1GB) before writing a new snapshot.
const MAX_DIR_BYTES = 1024 * 1024 * 1024; // 1GB
const MAX_DIR_BYTES = 5 * 1024 * 1024 * 1024; // 5GB
const TARGET_REDUCED_BYTES = Math.floor(MAX_DIR_BYTES * 0.9); // prune down to 90%
const baseDir = path.dirname(log.transports.file.getFile().path);
const heapDir = path.join(baseDir, "heap-snapshots");