gunicorn 20.0.4 忽略 --threads 参数
gunicorn 20.0.4 ignoring --threads argument
我 运行在 EKS (kubernetes) 中使用 Django。我有一个 运行 脚本执行
exec /usr/local/bin/gunicorn config.wsgi --timeout 30 -b 0.0.0.0:8000 --chdir /app --workers 1 --worker-tmp-dir /dev/shm --threads 2
但是当我检查容器日志时,它似乎忽略了一个事实,即我告诉它 运行 多于一个线程
| [2020-03-12 03:32:33 +0000] [28] [INFO] Starting gunicorn 20.0.4
│ [2020-03-12 03:32:33 +0000] [28] [INFO] Listening at: http://0.0.0.0:8000 (28)
│ [2020-03-12 03:32:33 +0000] [28] [INFO] Using worker: sync
│ [2020-03-12 03:32:33 +0000] [30] [INFO] Booting worker with pid: 30
有没有其他人遇到过这种情况,或者可以看到我在配置中没有看到的东西?
TIA
您没有指定工作人员 class 所以它可能尝试为您切换到 gthread 但您可能没有可加载的期货库? Reagrdless,我真的不推荐k8s中的gunicorn。线程池上的 Twisted Web 是一个更好的选择。
我 运行在 EKS (kubernetes) 中使用 Django。我有一个 运行 脚本执行
exec /usr/local/bin/gunicorn config.wsgi --timeout 30 -b 0.0.0.0:8000 --chdir /app --workers 1 --worker-tmp-dir /dev/shm --threads 2
但是当我检查容器日志时,它似乎忽略了一个事实,即我告诉它 运行 多于一个线程
| [2020-03-12 03:32:33 +0000] [28] [INFO] Starting gunicorn 20.0.4
│ [2020-03-12 03:32:33 +0000] [28] [INFO] Listening at: http://0.0.0.0:8000 (28)
│ [2020-03-12 03:32:33 +0000] [28] [INFO] Using worker: sync
│ [2020-03-12 03:32:33 +0000] [30] [INFO] Booting worker with pid: 30
有没有其他人遇到过这种情况,或者可以看到我在配置中没有看到的东西?
TIA
您没有指定工作人员 class 所以它可能尝试为您切换到 gthread 但您可能没有可加载的期货库? Reagrdless,我真的不推荐k8s中的gunicorn。线程池上的 Twisted Web 是一个更好的选择。