Open sjt157 opened 5 years ago
the create topics script runs in the background and is initiated by PID 1. Perhaps using disown
may allow this to be reaped after it has been completed - however, as the start_kafka
script runs as PID 1 I'm not sure if it will work. It will need a little investigation to test this.
Do you mean add disown
in the start_kafka script
? and Where is disown
added?After create-topics.sh &
??
I am not very familiar with Shell.
It would be create-topics.sh & disown
- but as the script runs as PID 1, I don't think the kernel will reap the process as it's PID 1's responsibility. We'd probably need to introduce a lightweight init system such as dumb-init to handle this scenario - https://github.com/Yelp/dumb-init#why-you-need-an-init-system
I see. What do you think of this solution?-https://github.com/phusion/baseimage-docker/blob/rel-0.9.16/image/bin/my_init .Which is more suitable to handle this scenario ?
I think for most, it's probably not a huge issue - so unless it's causing problems's (such as filing up the last slot in the process table - in which case you probably have bigger issues) then there's nothing to do. The Phusion solution requires Python - which seems like a lot of extra baggage to pull in (100MBs vs < 1Mb)
Hey, we are seeing this issue where eventually no new processes can be spawned on the host because of zombie processes with the same parent. The deployment is a single broker, zookeeper and AKHQ one, started via docker-compose on a SLES system.
Any hints on how to debug/improve this further?
Process is started by this container:
kafka-docker_kafka "start-kafka.sh" 29 hours ago Up 29 hours 0.0.0.0:9095->9095/tcp kafka-docker_kafka_1
so everytime a new topic is created (e.g. via AKHQ), a new defunct process hangs in the system (where 20653
is the kafka process)
root 32753 20653 0 07:20 ? 00:00:00 [timeout] <defunct>
platform: Ubuntu 16.04
docker-compose.yml