fork: Resource temporarily unavailable macOS Origin: Platform & cloud OSI layer 7 · Application Last updated 5 Nov 2026

macOS: -bash: fork: Resource temporarily unavailable (process limit reached)

The user hit the maximum number of processes (kern.maxprocperuid) — usually a fork bomb or runaway child processes.

Exact message you may see fork: Resource temporarily unavailable-bash: fork: Resource temporarily unavailablezsh: fork failed: resource temporarily unavailablefork: retry: Resource temporarily unavailableCannot fork: resource temporarily unavailable
Seen on: macOS

Meaning

Kill runaway processes (killall -9 name, or pkill), check counts with ps -ax | wc -l, and raise limits only if justified (sudo sysctl kern.maxprocperuid, ulimit -u). Typical triggers: infinite loops spawning subprocesses, zombie processes, test runners.

Common causes

  • Fork bomb or loop spawning processes
  • Zombie processes accumulating
  • Low per-user process limit
  • Tool spawning too many workers
  • Multiple IDE/test watchers

⚡ Quick fix

  1. Kill the offender: killall -9 name
  2. ps -axo pid,ppid,comm | sort -k2 | uniq -c | sort -rn | head
  3. Raise ulimit -u temporarily if needed

Detailed fix by platform

macOS

  1. sysctl kern.maxproc kern.maxprocperuid && ps -ax | wc -l

How to diagnose

  1. Count — Processes vs limit?
  2. Source — Which command spawns?
  3. Zombies — Present?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

Cannot allocate memory — fork: Cannot allocate memory / ENOMEM (Linux)Cannot allocate memoryEMFILE — Too many open files (EMFILE) (Linux)EMFILEfork: retry: Resource temporarily unavailable — fork: retry: Resource temporarily unavailable (process/thread limit) (Linux)fork: retry: Resource…Homebrew Cask: It seems there is already an App at — Homebrew: Error: It seems there is already an App at '/Applications/Chrome.app' (macOS)Homebrew Cask: It see…Homebrew: No available formula with the name — Homebrew: Error: No available formula with the name "x". Did you mean ...? (macOS)Homebrew: No availabl…KeyboardInterrupt — KeyboardInterrupt (script stopped with Ctrl+C) / ^C traceback (Python)KeyboardInterruptlaunchctl: Load failed: 5: Input/output error — macOS: Bootstrap failed: 5: Input/output error / launchctl load: Load failed: 5: Input/output error (macOS)launchctl: Load faile…OSError Errno 98 — OSError: [Errno 98] Address already in use (Python)OSError Errno 98fork: Res…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.