Turbo pack eating all CPU | Hitting cpu #93813
Replies: 2 comments
-
|
Legitimate Solutions for Turbopack CPU Issues1. Limit Turbopack's worker threads# Set thread limit before running dev server
export TURBOPACK_WORKER_THREADS=4 # or your CPU core count
next dev --turbopack2. Use Webpack for now (stable fallback)# Run without turbopack flag
next dev3. Monitor and profile# Check what's consuming CPU
top -p $(pgrep -f "next")
# Or use Node.js profiling
node --cpu-prof node_modules/.bin/next dev4. File system watchersIf you have // next.config.js
module.exports = {
experimental: {
turbopack: {
// Exclude large directories from watching
resolveAlias: {},
}
}
}5. Report the issueIf the problem persists, file a bug at https://github.com/vercel/next.js/issues with:
This helps the Turbopack team optimize for real-world setups. |
Beta Was this translation helpful? Give feedback.
-
|
I would be careful about installing a third-party package as the first fix here. High CPU from Turbopack is usually better debugged by isolating what Turbopack is watching/compiling.
generated files
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Turbo pack is consuming all CPU resources and causing a CPU overload. This issue can be resolved by using the following package:
https://www.npmjs.com/package/nextcool
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions