How to troubleshoot Next 16 specific memory issues
Unanswered
Red-breasted Nuthatch posted this in #help-forum
Red-breasted NuthatchOP
On Linux Mint using Bun version 1.3.14. I've just updated a small repo from Next 15, React 19 and MUI 7 -> Next 16, React 19, and MUI 9; it's a SPA that has had no dev load issues before but now balloons within seconds of loading localhost. You can see in the screenshot it consumes my entire 60~GB of available RAM. I would include the trace file but running dev for even 5 seconds leads to a 2GB trace file. If I downgrade to Next 15, still using turbopack, everything works as normal. 🤷 Downgrading other packages doesn't change the outcome.
I've tried:
- removing node_modules and .next then reinstalling
- using
- using
- everything else in this thread: https://github.com/vercel/next.js/discussions/94995 except for the devtools heap following as the actual page never loads and the entire system locks up in seconds
And just to note the many individual files shown in the analyzer screenshot are 16 line const objects immediately default exported that I async/await import later in groups of 5 at most at a time. The app renders combined information of two characters, instead of calculating each combination in real time I just generated static files for each possible output. This shouldn't have anything to do with it as build -> start works fine and these combinations are not loading with the app, the user needs to perform some interactions before the first import happens.
My question then is if the app immediately locks up before I can interact, what is a good way to further troubleshoot this?
I've tried:
- removing node_modules and .next then reinstalling
- using
--webpack- using
turbopackMemoryLimit - everything else in this thread: https://github.com/vercel/next.js/discussions/94995 except for the devtools heap following as the actual page never loads and the entire system locks up in seconds
And just to note the many individual files shown in the analyzer screenshot are 16 line const objects immediately default exported that I async/await import later in groups of 5 at most at a time. The app renders combined information of two characters, instead of calculating each combination in real time I just generated static files for each possible output. This shouldn't have anything to do with it as build -> start works fine and these combinations are not loading with the app, the user needs to perform some interactions before the first import happens.
My question then is if the app immediately locks up before I can interact, what is a good way to further troubleshoot this?