diff --git a/lifecycle/gunicorn.conf.py b/lifecycle/gunicorn.conf.py index ac29c8230..8aaff4ac5 100644 --- a/lifecycle/gunicorn.conf.py +++ b/lifecycle/gunicorn.conf.py @@ -54,8 +54,9 @@ logconfig_dict = { # if we're running in kubernetes, use fixed workers because we can scale with more pods # otherwise (assume docker-compose), use as much as we can if SERVICE_HOST_ENV_NAME in os.environ: - workers = 2 + default_workers = 2 else: default_workers = max(cpu_count() * 0.25, 1) + 1 # Minimum of 2 workers - workers = int(os.environ.get("WORKERS", default_workers)) + +workers = int(os.environ.get("WORKERS", default_workers)) threads = int(os.environ.get("THREADS", 4))