docker: use static worker count for docker (2 workers + 4 threads)

This commit is contained in:
Jens Langhammer 2020-09-06 22:16:12 +02:00
parent bf4763d946
commit fea44486c3
1 changed files with 4 additions and 3 deletions

View File

@ -1,15 +1,16 @@
"""Gunicorn config"""
import multiprocessing
import structlog
bind = "0.0.0.0:8000"
workers = multiprocessing.cpu_count() * 2 + 1
workers = 2
threads = 4
user = "passbook"
group = "passbook"
worker_class = "uvicorn.workers.UvicornWorker"
# Docker containers don't have /tmp as tmpfs
worker_tmp_dir = "/dev/shm"
logconfig_dict = {
"version": 1,