Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not fork a process for a condition check #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bostko
Copy link

@bostko bostko commented Jul 26, 2018

Fork process only when AUTORELOAD is true.
Not needed to fork a process even when AUTORELOAD is false.

Problem which was observed.
At the moment we have an image X built on top of nginx-big-upload.
I started a container on a server with X.
When rebuild my docker image and make X'
and do

docker-compose pull
docker-compose up -d

Then a zombie process is observed:

ps auxf # on host
root     32146  0.0  0.0   4052   660 ?        Ss   11:16   0:00  |   |   \_ /usr/bin/dumb-init /bin/bash /opt/nginx-big-upload/docker/entrypoint.sh
root     32221  0.0  0.0  26872  6120 ?        Ss   11:16   0:00  |   |       \_ nginx: master process nginx -g daemon off;
root     32238  0.0  0.0      0     0 ?        Z    11:16   0:00  |   |           \_ [bash] <defunct>
vvvv    32239  0.0  0.0  26920  3584 ?        S    11:16   0:00  |   |           \_ nginx: worker process

echo "there is a zombie with pid 32238" 

Fork process only when AUTORELOAD is true.
Not needed to fork a process even when AUTORELOAD is false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant