I'm running django in EKS (kubernetes). I have a run script that executes
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
but when I check the container logs, it seems to be ignoring the fact that I told it to run more than a single thread
| [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
Has anyone else experienced this, or can see something that I'm just not seeing in my config?
TIA
You didn't specify a worker class so it probably tried to switch to gthread for you but you likely don't have the futures library loadable? Reagrdless, I really don't recommend gunicorn in k8s. Twisted Web on a thread pool is a much better bet.