thedaviddelta / lingva-translate

Alternative front-end for Google Translate

Home Page:https://lingva.thedaviddelta.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zombie process production in docker mode

thantez opened this issue · comments

Hi. I thank you for this useful project.
After a time of config self-hosted Lingva and using it based on docker, Ubuntu attend me that some zombie processes exist. First I checked what is the command of these zombies, and this is the result:
image

After that, I checked this processes, are belongs to which parent?
image

Until there, I found there is a node.js based project that make zombies. So I checked which parent process call this yarn start command:
image

and I checked which container uses this ID:
image

Based on this clues, I had this hypothesis that probably this problem caused by Lingva container. For the proof, I do these steps:

  1. check Lingva project that is based on node.js: Yes it is ✅
  2. If I stop Lingva container, zombies should die,
    image
    and yeah, they died. ✅

So I don't know how, but I know Lingva docker image produce some zombie processes that this is the issue.


  • Ubuntu kernel version: 5.4.0-131-generic
  • Docker version: 20.10.18, build b40c2f6
  • Lingva image tag: latest created 2 weeks ago

If you need other information, tell me.

commented

Hello and sorry for the late response.

I did read this some time ago but forgot to answer, because I didn't have much to contribute, I'm sorry.
I don't actively host Lingva with Docker, just have created several containers in my local machine while developing, maintaining and testing the Docker version. In those chances, I didn't notice any issue.
Maybe if some other people suffer from this issue and report it we can get a wider view, with multiple possible explanations, and start to narrow it. For the moment, I'd just recommend you to restart the process from time to time if this still happens to you.

Thanks and regards, David.

commented

Could you try with --init using docker run, or in docker-compose, init: true: https://docs.docker.com/compose/compose-file/compose-file-v2/#init

I'm guessing since there's no init process inside the container, there's nothing that can reap the zombie processes. This also seems to be a common problem with docker HEALTHCHECK.

The readme could be updated to reflect this.

commented

Amazing! Thank you so much for your help @camporter!
May then removing HEALTHCHECK from the Dockerfile also solve this issue without adding an init proccess?

Could you please try this (both just removing HEALTHCHECK, and just adding --init) and report whether this solves your issue @thantez? I'd then edit the project's Dockerfile, or add the parameter to the README.

Thanks again and regards, David.