dev server
crashes with out of memory error when missing import in page
#51025
Labels
bug
Issue was opened via the bug report template.
linear: next
Confirmed issue that is tracked by the Next.js team.
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023 Binaries: Node: 18.15.0 npm: 8.19.4 Yarn: 1.22.19 pnpm: 8.6.1 Relevant packages: next: 13.4.5-canary.9 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/next-js-memory-leak-case-reached-heap-limit-2t3tj9
To Reproduce
After visiting the reproduction repo:
dev server
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Describe the Bug
This error happens in
dev mode
in 256MB Ram environments when a wrong import is found, and multiple pages of the app are requested, simulating traffic to the website (in the repo, this is created by usingauto-cannon
).The error may be related to other memory errors reported on #50909 and #49929 and also may add a datapoint into the Hypothesis of a current memory leak in Next.js.
Expected Behavior
The app shouldn't crash with an out of memory error when a missing import is found.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
NEXT-1432
The text was updated successfully, but these errors were encountered: