Bug: extremely high memory usage with `next dev`
See original GitHub issueVerify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: android
Arch: arm64
Version: #2 SMP PREEMPT Fri Aug 5 15:52:33 AST 2022
Binaries:
Node: 18.10.0
npm: 8.19.2
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.3-canary.0
eslint-config-next: 13.0.2
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
Chrome Canary v109.0.5400.0 (Android)
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
The memory usage on the last next 13 (13.0.3-canary.0 and 13.0.2) releases are too high. next dev
command uses about 1gb of ram. Next 12 is using about 300mb-500mb’s of ram.
Expected Behavior
next dev
should use less ram.
Link to reproduction
.
To Reproduce
- Create project with Next 13
- Run
next dev
- Check the ram usage
Issue Analytics
- State:
- Created a year ago
- Reactions:34
- Comments:59 (14 by maintainers)
Top Results From Across the Web
Next dev server RAM usage issue : r/nextjs - Reddit
My Nextjs dev server slowly starts at an average RAM usage but eventually inflates to 1GB+ RAM usage. Is this just me or...
Read more >Debugging and fixing a memory leak on NextJS / Node
Last week I had to debug my first memory leak: our server crashed at regular intervals and the memory usage chart showed that...
Read more >Troubleshooting Node.js Memory Use - Heroku Dev Center
Very large memory use might even crash the Node process, leading to dropped requests and downtime. If a memory leak is small and...
Read more >Very high memory usage of GPU Process after watching many ...
So far, I do not see anything like "extremely high" memory usage ... reports in about:memory for Mozilla Firefox developers for deep analyzing...
Read more >Reduce memory usage in files – Figma Help Center
If you're working with large files or libraries in Figma you may run into these limits. To continue to use affected files, you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Another update:
hey, sorry I was busy investigating the issue!
Small update: I managed to identify the 3 main sources of memory leaks that I think are causing the crashes in dev so I’ll work on fixing those quickly. This should help a lot hopefully.
Thanks @soylemezali42 for the test app, it was very very helpful 🙏.