A Linux file server that normally runs nightly backups has suddenly stopped accepting new SSH sessions, and many interactive commands fail with the message:
bash: fork: Resource temporarily unavailable
When you run ps -eo pid,ppid,stat,cmd | head on the system console, you see hundreds of lines whose STAT column shows Z+. Attempting kill -9 <PID> on several of those PIDs has no effect-the entries remain in the process list.
Which of the following actions should you take first to restore normal operation?
Increase the per-user process limit with ulimit -u and restart the SSH daemon.
Delete any stale *.pid files in /run and start the backup service again.
Raise kernel.pid_max to a higher value and run systemctl daemon-reload.
Identify and restart (or gracefully terminate) the parent process so that the zombie children are reaped by init.
The Z+ status indicates zombie (defunct) child processes that have finished execution but whose parent has not called wait() to reap them. Zombies still occupy PIDs, so once enough accumulate the kernel can no longer fork new processes, producing the "Resource temporarily unavailable" error. Because a zombie is already dead, signals such as SIGKILL do nothing to it directly; instead, the parent must reap the child. Terminating or restarting the parent process (or sending it SIGCHLD) causes the init process to adopt the defunct children and clean them from the process table, freeing PIDs and allowing new logins. Raising ulimit, increasing kernel.pid_max, or deleting PID files treats the symptom but leaves the un-reaped zombies-and the underlying application bug-intact.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the `Z+` status in the process table indicate?
Open an interactive chat with Bash
What is the role of the parent process in handling zombie processes?