ao-web next-server leaks zombie processes (~11/min) until the OS process-table cap; machine-wide fork failures
Summary
ao-web's next-server (both the supervised :3000 instance started by ao start and the dist-server/direct-* variant) does not reap the child processes it spawns. Zombies (<defunct>) accumulate at roughly 11/minute under normal dashboard operation until the per-user process-table cap is reached, at which point every process on the machine starts failing with fork failed: resource temporarily unavailable.
Environment
@aoagents/ao0.9.5 /@aoagents/ao-web0.9.5 (global install)- macOS (Darwin 25.5.0), node v22.21.0
kern.maxprocperuid= 2666
Observed incident (2026-07-28/29)
ao start <project>supervisesao-web(wrapper → next-server). Within ~1.5-3h of uptime,ps -axo stat | grep -c Zreached 1,145 zombies, all with the next-server PID as parent (verified viaps -axo ppid=,stat=).- Combined with live processes (~750), the user hit the 2,666 process cap: unrelated tools began failing to fork (observed across shells, git, gh, and plausibly contributed to Docker Desktop and an Electron app dying the same day).
kill <next-server-pid>reparented the zombies to launchd, which reaped them instantly (1,053 → 0), confirming the parent simply neverwait()s.- The ao daemon respawns ao-web after a kill, so the leak restarts (~3h to crisis per cycle).
Ask
- Reap spawned children in ao-web's server (SIGCHLD handler /
child.on('exit')on whatever spawns the per-request work — the zombie births correlate with dashboard polling activity). - Optionally: a
--no-webflag forao startso headless operators can opt out of the dashboard entirely.
Happy to provide more diagnostics from a live leak if useful.
Thanks for contributing to Agent Orchestrator.
This issue is being picked up by the current external contributor on-call pair:
- @illegalcall
- @pulkit7070
If someone is already working on this, please continue as usual. The on-call pair is added for visibility, tracking, and support, not to take over the work. If you need help with review, direction, reproduction, or next steps, please tag @illegalcall and @pulkit7070 here.
For faster context or live questions, you can also join the AO Discord.
Join the session here: https://discord.gg/H6ZDcUXmq
Come by if you want to see what is being built, ask questions, or just hang around with the community.
@AgentWrapper The reported ao-web and next-server process path does not exist in current main. Current preview and runtime processes use the Go and Electron supervision paths.
This legacy issue can be closed as obsolete.
Hi @Tonedeath, the ao-web next-server is gone from main entirely (the rewrite removed that architecture), so the zombie-process leak has no code left to fix. Closing as obsolete. Thanks for the investigation.