Skip to content

Commit

Permalink
Reduce workers from 6 to 3, should be more than enough with reduced r…
Browse files Browse the repository at this point in the history
…esponsibilities (no /ingest)
  • Loading branch information
KastanDay committed Mar 8, 2024
1 parent 3017603 commit 81fc4ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ai_ta_backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 81fc4ef

Please sign in to comment.