feat(ml): support dynamic scaling (#12065)

feat(ml): make http keep-alive configurable

Closes #12064
This commit is contained in:
Richard Kojedzinszky
2024-08-29 17:11:49 +02:00
committed by GitHub
parent 9f5a3f1e84
commit f3e176e192
2 changed files with 20 additions and 15 deletions

View File

@@ -13,6 +13,7 @@ fi
: "${IMMICH_HOST:=[::]}"
: "${IMMICH_PORT:=3003}"
: "${MACHINE_LEARNING_WORKERS:=1}"
: "${MACHINE_LEARNING_HTTP_KEEPALIVE_TIMEOUT_S:=2}"
gunicorn app.main:app \
-k app.config.CustomUvicornWorker \
@@ -20,4 +21,5 @@ gunicorn app.main:app \
-w "$MACHINE_LEARNING_WORKERS" \
-t "$MACHINE_LEARNING_WORKER_TIMEOUT" \
--log-config-json log_conf.json \
--keep-alive "$MACHINE_LEARNING_HTTP_KEEPALIVE_TIMEOUT_S" \
--graceful-timeout 0