Skip to content

Instantly share code, notes, and snippets.

@mowings
Created April 15, 2021 13:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mowings/130f8c79ee6524705f33c0da1a6b7c37 to your computer and use it in GitHub Desktop.
Save mowings/130f8c79ee6524705f33c0da1a6b7c37 to your computer and use it in GitHub Desktop.
Kubernetes PID exhaustion (fork rejected by pids controller in /kubepods...)

Kernel errors like:

kubernetes cgroup: fork rejected by pids controller in /kubepods/burstable/... accompainied by errors creating threads or starting processes on base OS can be caused by the kubepods cgroup pids.max being to low

cat /sys/fs/cgroup/pids/kubepods/pids.max

If this is low, it can be reset by setting kernel.pid_max to a large number (kernel.pid_max=4194304) then restart kubelet. After a bit, kubepods/pids.max should be bumped up to the same number (can take a few minutes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment