Interview Prep/Docker/Resources, health checks, logging and restarts

Container can't create threads/processes: `fork: retry: Resource temporarily unavailable`.

AdvancedTroubleshootingResources, health checks, logging and restarts
Answer

Likely causes → --pids-limit reached, or host/user nproc ulimit, or threads leak.

Diagnose →

docker inspect -f '{{.HostConfig.PidsLimit}}' c
docker exec c sh -c 'ls /proc | grep -c "^[0-9]"'
cat /sys/fs/cgroup/.../pids.current

Fix → Raise limit, fix leaking process/thread creation, reap zombies (--init).

Prevent → Alert on pids.current.

All Docker questions Roadmap: Docker & containers

More on Resources, health checks, logging and restarts