From c6df495552a28c52560fcc793676e9cdef01e854 Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Nov 30 2022 09:47:52 +0000 Subject: waiverdb: Set fixed number of processes ans threads New waiverdb container image starts 8 gunicorn web worker processes by default using WEB_CONCURRENCY environment variable. This causes memory to spike (over 500MiB) and workers to get terminated. Instead of increasing memory limits, a better solution is to decrease the number of processes and increase number of threads since the app mostly waits on DB requests to finish and waiverdb workers themselves are thread-safe. --- diff --git a/roles/openshift-apps/waiverdb/templates/deploymentconfig.yml b/roles/openshift-apps/waiverdb/templates/deploymentconfig.yml index 04d4713..bf76918 100644 --- a/roles/openshift-apps/waiverdb/templates/deploymentconfig.yml +++ b/roles/openshift-apps/waiverdb/templates/deploymentconfig.yml @@ -60,6 +60,11 @@ spec: mountPath: /etc/fedora-messaging readOnly: true env: + - name: GUNICORN_CMD_ARGS + value: >- + --workers=3 + --threads=6 + --timeout=90 - name: DATABASE_PASSWORD valueFrom: secretKeyRef: