From 81fc4ef1e42ceb3d10b9ab1b904fa258e3120c9a Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Thu, 7 Mar 2024 17:07:51 -0800 Subject: [PATCH] Reduce workers from 6 to 3, should be more than enough with reduced responsibilities (no /ingest) --- ai_ta_backend/main.py | 3 ++- run.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ai_ta_backend/main.py b/ai_ta_backend/main.py index c5d9cb46..69cd246f 100644 --- a/ai_ta_backend/main.py +++ b/ai_ta_backend/main.py @@ -59,7 +59,8 @@ def index() -> Response: Returns: JSON: _description_ """ - response = jsonify({"Choo Choo": "Welcome to your Flask app 🚅"}) + response = jsonify( + {"hi there, this is a 404": "Welcome to UIUC.chat backend 🚅 Read the docs here: https://docs.uiuc.chat/ "}) response.headers.add('Access-Control-Allow-Origin', '*') return response diff --git a/run.sh b/run.sh index 0d77691a..f73f2369 100755 --- a/run.sh +++ b/run.sh @@ -5,4 +5,4 @@ # 200 MB object store memory.. necessary to statically allocate or will crash in Railway env restrictions. # ray start --head --num-cpus 6 --object-store-memory 300000000 export PYTHONPATH=${PYTHONPATH}:$(pwd)/ai_ta_backend -exec gunicorn --workers=6 --threads=20000 --worker-class=gthread ai_ta_backend.main:app --timeout 1800 +exec gunicorn --workers=3 --threads=20000 --worker-class=gthread ai_ta_backend.main:app --timeout 1800