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

`too many open files` inside a container.

BeginnerTroubleshootingResources, health checks, logging and restarts
Answer

Likely causes → Low nofile ulimit, FD leak, or host fs.file-max/inotify limits.

Diagnose →

docker exec c sh -c 'ulimit -n'
docker exec c ls /proc/1/fd | wc -l
sysctl fs.inotify.max_user_instances

Fix → --ulimit nofile=65536:65536; raise inotify sysctls on host for watchers (ENOSPC on inotify); fix leaks.

Prevent → Standard ulimits in daemon.json default-ulimits.

All Docker questions Roadmap: Docker & containers

More on Resources, health checks, logging and restarts