nextjs - 💡(How to fix) Fix [Turbopack] next-server process becomes zombie with 400-700% CPU, doesn't terminate [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#86893Fetched 2026-04-08 02:08:31
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×2closed ×1commented ×1locked ×1

Fix Action

Workaround

Use webpack instead of Turbopack:

next dev --webpack

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin 25.1.0
Binaries:
  Node: 22.20.0
  pnpm: 9.14.4
Relevant Packages:
  next: 16.0.7
  react: 18.3.1
  react-dom: 18.3.1

---

next dev --webpack
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

Private repository - cannot share, but reproduction steps below.

To Reproduce

  1. Create a Next.js 16.0.7 app with Turbopack (default)
  2. Have a large React component (~2400 lines) with complex context patterns
  3. Run next dev (uses Turbopack by default)
  4. Navigate to pages that use these components
  5. Observe next-server process CPU spike to 400-700%

Current vs. Expected behavior

Current:

  • next-server process spikes to 400-700% CPU
  • Render times go from ~300ms to 50-100+ seconds
  • Process won't terminate even with pkill -9 -f next
  • .next directory cannot be deleted ("Directory not empty")
  • Only fix is to kill -9 <specific PID> the zombie process

Expected:

  • Normal CPU usage
  • Process terminates cleanly when killed
  • Render times stay consistent

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin 25.1.0
Binaries:
  Node: 22.20.0
  pnpm: 9.14.4
Relevant Packages:
  next: 16.0.7
  react: 18.3.1
  react-dom: 18.3.1

Which area(s) are affected? (Select all that apply)

Turbopack

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

  • Switching to next dev --webpack completely resolves the issue
  • The Single item size exceeds maxSize warning appears in logs before the issue manifests
  • Issue seems related to HMR on large files with complex React context provider patterns
  • Logs show compile times are reasonable (~1s) but render times balloon to 50-100+ seconds
  • Multiple zombie next-server processes can accumulate over time if not manually killed

Workaround

Use webpack instead of Turbopack:

next dev --webpack

extent analysis

TL;DR

Switch to Webpack by running next dev --webpack to avoid the high CPU usage issue with Turbopack.

Guidance

  • The issue seems related to Hot Module Replacement (HMR) on large files with complex React context provider patterns, so using Webpack instead of Turbopack may help mitigate this.
  • Verify that the next-server process CPU usage returns to normal and render times are consistent after switching to Webpack.
  • If the issue persists, try to simplify the complex React context patterns in the large component to see if it reduces the CPU usage.
  • Monitor the logs for the Single item size exceeds maxSize warning, as it may be related to the issue.

Example

No code snippet is provided as the issue is more related to the build tool (Turbopack) and its configuration rather than a specific code snippet.

Notes

The provided workaround using Webpack seems to resolve the issue, but it may not be a permanent solution. The root cause of the issue with Turbopack still needs to be investigated and fixed.

Recommendation

Apply the workaround by using next dev --webpack until the issue with Turbopack is resolved, as it provides a stable development environment with normal CPU usage and consistent render times.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix [Turbopack] next-server process becomes zombie with 400-700% CPU, doesn't terminate [1 comments, 2 participants]