vercel/next.js · error
Saving heap snapshot to ${heapFilename}. Note: this will ta
Error message
Saving heap snapshot to ${heapFilename}. Note: this will take some time. What it means
traceMemoryUsage warns the first time heap usage crosses the threshold that it is synchronously writing a V8 heap snapshot to distDir/<description>.heapsnapshot; the note about timing exists because snapshot writing can take a while on large heaps.
Source
Thrown at packages/next/src/lib/memory/trace.ts:109
info(` - Percentage Heap Used: ${percentageHeapUsed.toFixed(2)}%`)
info('***************************************')
info('')
if (percentageHeapUsed > HEAP_SNAPSHOT_THRESHOLD_PERCENT) {
const distDir = traceGlobals.get('distDir')
const heapFilename = join(
distDir,
`${description.replace(' ', '-')}.heapsnapshot`
)
warn(
bold(
`Heap usage is close to the limit. ${percentageHeapUsed.toFixed(
2
)}% of heap has been used.`
)
)
if (!alreadyGeneratedHeapSnapshot) {
warn(
bold(
`Saving heap snapshot to ${heapFilename}. ${italic(
'Note: this will take some time.'
)}`
)
)
v8.writeHeapSnapshot(heapFilename)
alreadyGeneratedHeapSnapshot = true
} else {
warn(
'Skipping heap snapshot generation since heap snapshot has already been generated.'
)
}
}
}
}
View on GitHub (pinned to 0eb3775416)
Solutions
- Wait while the heap snapshot is written to disk, then analyze it with Chrome DevTools or similar.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at packages/next/src/lib/memory/trace.ts:109 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19).
Data as JSON: /api/errors/1ef601c3f553eab2.
Report an issue: GitHub.