docker: use static worker count for docker (2 workers + 4 threads)
This commit is contained in:
parent
bf4763d946
commit
fea44486c3
|
@ -1,15 +1,16 @@
|
||||||
"""Gunicorn config"""
|
"""Gunicorn config"""
|
||||||
import multiprocessing
|
|
||||||
|
|
||||||
import structlog
|
import structlog
|
||||||
|
|
||||||
bind = "0.0.0.0:8000"
|
bind = "0.0.0.0:8000"
|
||||||
workers = multiprocessing.cpu_count() * 2 + 1
|
workers = 2
|
||||||
|
threads = 4
|
||||||
|
|
||||||
user = "passbook"
|
user = "passbook"
|
||||||
group = "passbook"
|
group = "passbook"
|
||||||
|
|
||||||
worker_class = "uvicorn.workers.UvicornWorker"
|
worker_class = "uvicorn.workers.UvicornWorker"
|
||||||
|
# Docker containers don't have /tmp as tmpfs
|
||||||
|
worker_tmp_dir = "/dev/shm"
|
||||||
|
|
||||||
logconfig_dict = {
|
logconfig_dict = {
|
||||||
"version": 1,
|
"version": 1,
|
||||||
|
|
Reference in a new issue