我的Docker容器中的django应用程序上有一个gunicorn Web服务器,我的gunicorn配置是:
bind = '0.0.0.0:8001'
loglevel = 'debug'
errorlog = '-'
accesslog = '-'
preload = True
reload = True
workers = 2
我的枪炮命令是:
gunicorn -c gunicorn_conf.py project.wsgi:application
当我在容器中点击ps aux
或docker top
时,我希望它只显示 2 进程,但事实证明它有三个像下面的那个
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 21756 2600 ? Ss 21:48 0:00 /bin/bash /usr/src/app/entrypoint.sh
root 6 0.0 1.0 97424 21860 ? S 21:48 0:01 /usr/local/bin/python /usr/local/bin/gunicorn -c gunicorn_conf.py project.wsgi:application
root 11 2.7 3.2 310404 65560 ? Sl 21:48 1:20 /usr/local/bin/python /usr/local/bin/gunicorn -c gunicorn_conf.py project.wsgi:application
root 12 2.7 3.2 310408 65572 ? Sl 21:48 1:20 /usr/local/bin/python /usr/local/bin/gunicorn -c gunicorn_conf.py project.wsgi:application