-
Notifications
You must be signed in to change notification settings - Fork 28.3k
Turbopack crashing in dev server after prolonged usage #73921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
can you give us a bit more info about your setup (how much RAM do you have) and how much RAM Turbopack was using? |
i don't know about the RAM turbopack was using when it crashed, I'll keep a log incase turbopack crashes again in the future. Anyway I have 32 gigs of RAM which should be more than enough (unless bun has some limit placed by default?) |
The same thing here. The project is new, so it is very small yet. Sometimes it stops the dev server in a few minutes Running
Next server was using more than 3GB of memory. |
This indicates Node.js running out of memory, but Turbopack does not run in Node.js, it runs in Rust. Could you try to reproduce while running with webpack as well? That way there will be a better pointer of where to search for the reason it happens. Right now it could be anything:
Thanks in advance! |
It's most likely a memory leak in Next.js itself, since it used to crash randomly before turbopack was released (in webpack). And it probably isn't a problem with my code since I've had the dev server crash on multiple projects. One thing in common with all those occurrences is that the dev server crashes when I've not restarted the dev server for more than a day. |
We've reduced memory usage of Turbopack a lot in Next.js 15.2: https://nextjs.org/blog/next-15-2#turbopack-performance-improvements. Unfortunately we can't investigate further based on the details you have provided so I'm going to close this issue.
We're not aware of any leaks currently. If this is your assessment we highly recommend sharing performance profiling and details on the exact memory usage in a plain Next.js application, not your application, to rule out any external factors. |
Link to the code that reproduces this issue
https://github.com/soulr344/CGPA-calculator
To Reproduce
Run the dev server continuously for some time (a day in my case). (The reproduction link is NOT related in this case, it's present just so the issue doesn't get closed by the bot)
Current vs. Expected behavior
The turbopack dev server crashes after prolonged usage due to failing memory allocation. In this instance, it crashed after a day of continuous, uninterrupted usage.
Last lines in terminal:
.next/trace:
trace.txt
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Fri, 22 Nov 2024 16:04:27 +0000 Available memory (MB): 31799 Available CPU cores: 32 Binaries: Node: 22.6.0 npm: 10.7.0 Yarn: N/A pnpm: N/A Relevant Packages: next: 15.1.0 // Latest available version is detected (15.1.0). eslint-config-next: 15.1.0 react: 19.0.0 react-dom: 19.0.0 typescript: 5.7.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: