$RodHat_/search
resource limits reference

RLIMIT_NPROC

Maximum number of processes and threads for the real user ID.

Resource number
6
Row in /proc/PID/limits
Max processes
bash ulimit flag
ulimit -u
Unit in /proc/PID/limits
processes
Group
Processes and signals

What happens at the limit

fork(2) and clone(2) fail with EAGAIN.

Error names: EAGAIN.

Threads count, and the count is per real user ID, not per process tree. Two services running as the same user share one budget. The limit is not enforced for a process with CAP_SYS_ADMIN or CAP_SYS_RESOURCE, or one running with real user ID 0.

Check a running process with grep -i "Max processes" /proc/PID/limits, or paste the whole file into the limits reader. Inspect or change one on a live process with prlimit --pid PID(util-linux).

Sources

  1. getrlimit(2), Linux man-pages
  2. proc_pid_limits(5), Linux man-pages

Resource numbers are from asm-generic/resource.h; a few architectures (Alpha, MIPS, SPARC) number some limits differently. The list of syscall cards is matched by name from the card text on this site, not from the kernel source. Spot one that's wrong? Tell Rod.