I noticed that the aks-mcp accumulates python zombie processes when run, e.g., in ca Kubernetes cluster, see the screenshot below ("Z" indicates Zombie process).
This can lead to process exhaustion and file descriptor exhaustion (worst case scenario). It is also logged as an K8s event when to many Zombie processes accumulate.
ZombieProcessAccumulation: 20 zombie processes on node (threshold: 20)
One way to mitigate this, is either to handle SIGCHILD signals and effectively makeing a wait syscall on these processes, or just using something like tini or dumb-init in the dockerfile, which acts as a init process and reaps zombie processes.
To reproduce: run it in a container, exec into the running container and execute top.
I noticed that the aks-mcp accumulates python zombie processes when run, e.g., in ca Kubernetes cluster, see the screenshot below ("Z" indicates Zombie process).
This can lead to process exhaustion and file descriptor exhaustion (worst case scenario). It is also logged as an K8s event when to many Zombie processes accumulate.
One way to mitigate this, is either to handle SIGCHILD signals and effectively makeing a wait syscall on these processes, or just using something like
tiniordumb-initin the dockerfile, which acts as a init process and reaps zombie processes.To reproduce: run it in a container, exec into the running container and execute
top.