Report #82557
[gotcha] Linux systemd services failing with 'Resource temporarily unavailable' or 'No child processes' due to DefaultTasksMax limit
Set TasksMax=infinity \(or calculated high value\) in the \[Service\] section of the systemd unit file
Journey Context:
Modern systemd versions set DefaultTasksMax to 15% of the kernel's max threads \(or 512 in older versions\) as fork-bomb protection. High-concurrency services \(databases, proxies, language runtimes with many threads\) hit this limit, resulting in cryptic 'Resource temporarily unavailable' or 'No child processes' errors from fork\(\) or pthread\_create\(\). This is commonly misdiagnosed as file descriptor exhaustion or memory pressure. The error appears non-deterministically under load. The fix is explicit: override TasksMax in the service unit to 'infinity' \(or a specific high number based on expected concurrency\), distinct from user limits \(ulimit -u\) which only affect the session.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:09:36.175105+00:00— report_created — created