What went wrong?
When I log into a node on my k8s cluster I see:
There is 1 zombie process
The zombie PID is associated with sh and I was able to trace the parent back to the bookorbit pod.
The most likely culprit is the HEALTHCHECK in the Dockerfile which uses shell form spawning a shell process, potentially interfering with proper signal handling and process management.
Suggested fix: Change the HEALTHCHECK from shell form to exec form:
# Before (shell form)
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD node -e "const p=process.env.PORT||3000;fetch('http://127.0.0.1:'+p+'/api/v1/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
# After (exec form)
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD ["node", "-e", "const p=process.env.PORT||3000;fetch('http://127.0.0.1:'+p+'/api/v1/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
Steps to reproduce
- Run BookOrbit container (I deployed to Kubernetes).
- View zombie processes with
ps -eo pid,ppid,stat,comm | awk '$3 ~ /Z/'. Your environment may or may not exhibit this behavior but mine does.
Expected vs actual behavior
Expected:
Running the container leaves no zombie processes.
Actual:
There is 1 zombie process on the node where the bookorbit container is running, associated to its pod.
Your setup
Book Orbit v1.10.0 bookorbit/bookorbit:latest
Deployment: Kubernetes (MicroK8s cluster)
OS: Ubuntu Server 26.04, Raspberry Pi
Relevant logs (optional)
Screenshots (optional)
No response
Before submitting
What went wrong?
When I log into a node on my k8s cluster I see:
There is 1 zombie processThe zombie PID is associated with
shand I was able to trace the parent back to the bookorbit pod.The most likely culprit is the
HEALTHCHECKin theDockerfilewhich uses shell form spawning a shell process, potentially interfering with proper signal handling and process management.Suggested fix: Change the
HEALTHCHECKfrom shell form to exec form:Steps to reproduce
ps -eo pid,ppid,stat,comm | awk '$3 ~ /Z/'. Your environment may or may not exhibit this behavior but mine does.Expected vs actual behavior
Expected:
Running the container leaves no zombie processes.
Actual:
There is 1 zombie process on the node where the bookorbit container is running, associated to its pod.
Your setup
Book Orbit v1.10.0 bookorbit/bookorbit:latest
Deployment: Kubernetes (MicroK8s cluster)
OS: Ubuntu Server 26.04, Raspberry Pi
Relevant logs (optional)
Screenshots (optional)
No response
Before submitting