From 5d4bdba18e953779994fbd15702dcad0a078283e Mon Sep 17 00:00:00 2001 From: Skye Bender-deMoll Date: Tue, 18 Feb 2025 14:31:41 -0800 Subject: [PATCH 1/3] [CV2-6066] change warning message to not include actual key value so sentry errors will group --- app/main/lib/presto.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main/lib/presto.py b/app/main/lib/presto.py index e72fc763..e3ab50c1 100644 --- a/app/main/lib/presto.py +++ b/app/main/lib/presto.py @@ -55,6 +55,7 @@ def blocked_response(message, model_type): _, value = response return json.loads(value) else: - app.logger.error(f"Timeout reached while waiting for key '{model_type}_{item_id}'") + + app.logger.error(f"Timeout reached while waiting for key for model '{model_type}'") # TODO: should this raise an exception? this probably indicates data is being lost return None From 6d1abb9dc8ca4c3ae2620df465893c6a75579ef7 Mon Sep 17 00:00:00 2001 From: Skye Bender-deMoll Date: Tue, 18 Feb 2025 14:33:33 -0800 Subject: [PATCH 2/3] double number of alegre web server worker processes to 16 in QA and Live to handle more connections --- production/bin/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production/bin/start.sh b/production/bin/start.sh index 5cd23037..b6ca4e38 100755 --- a/production/bin/start.sh +++ b/production/bin/start.sh @@ -66,4 +66,4 @@ set +o allexport python manage.py init python manage.py init_perl_functions python manage.py db upgrade -gunicorn --preload -w 8 --threads 4 -b 0.0.0.0:${ALEGRE_PORT} --access-logfile - --error-logfile - wsgi:app +gunicorn --preload -w 16 --threads 4 -b 0.0.0.0:${ALEGRE_PORT} --access-logfile - --error-logfile - wsgi:app From ab6dda1776b6b417c3f14bf162e29ab6a3c3ac43 Mon Sep 17 00:00:00 2001 From: Skye Bender-deMoll Date: Mon, 24 Feb 2025 14:44:52 -0800 Subject: [PATCH 3/3] on further reading, it seems better to bump the number of threads instead of workers --- production/bin/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production/bin/start.sh b/production/bin/start.sh index b6ca4e38..8110ced4 100755 --- a/production/bin/start.sh +++ b/production/bin/start.sh @@ -66,4 +66,4 @@ set +o allexport python manage.py init python manage.py init_perl_functions python manage.py db upgrade -gunicorn --preload -w 16 --threads 4 -b 0.0.0.0:${ALEGRE_PORT} --access-logfile - --error-logfile - wsgi:app +gunicorn --preload -w 8 --threads 8 -b 0.0.0.0:${ALEGRE_PORT} --access-logfile - --error-logfile - wsgi:app