lifecycle: decrease default worker count on compose
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
e83465517b
commit
13a8ad3126
|
@ -51,7 +51,8 @@ logconfig_dict = {
|
||||||
if SERVICE_HOST_ENV_NAME in os.environ:
|
if SERVICE_HOST_ENV_NAME in os.environ:
|
||||||
workers = 2
|
workers = 2
|
||||||
else:
|
else:
|
||||||
workers = int(os.environ.get("WORKERS", cpu_count() * 2 + 1))
|
default_workers = max(cpu_count() * 0.25, 1) + 1 # Minimum of 2 workers
|
||||||
|
workers = int(os.environ.get("WORKERS", default_workers))
|
||||||
threads = 4
|
threads = 4
|
||||||
|
|
||||||
warnings.simplefilter("once")
|
warnings.simplefilter("once")
|
||||||
|
|
Reference in New Issue