Interview Prep/Linux/Logs, Limits & High-Traffic Tuning

How do you protect a host from fork bombs and runaway process counts?

IntermediateProductionLogs, Limits & High-Traffic Tuning
Answer

Limit processes per user (nproc in limits.conf for login users), per service (TasksMax= in systemd units), and for containers (pids.max via --pids-limit or Kubernetes pod PID limits). systemd's default TasksMax on user slices already prevents a single user's fork bomb from taking down the host.

All Linux questions Roadmap: Linux

More on Logs, Limits & High-Traffic Tuning