From 5e99ee059765cc0ff2daf74e8a0b873784fbf5d6 Mon Sep 17 00:00:00 2001 From: David Losada Carballo Date: Tue, 26 Sep 2023 19:50:20 +0200 Subject: [PATCH] platform-api: add phpfpm process management configuration values --- charts/platform-api/Chart.yaml | 2 +- charts/platform-api/templates/api-worker.yml | 12 ++++++++++++ charts/platform-api/values.yaml | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/charts/platform-api/Chart.yaml b/charts/platform-api/Chart.yaml index f24d8a2..ba970e7 100644 --- a/charts/platform-api/Chart.yaml +++ b/charts/platform-api/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 name: ushahidi-platform-api -version: 0.0.1-alpha.22 +version: 0.0.1-alpha.23 icon: https://github.ushahidi.org/helm-charts/icon.png diff --git a/charts/platform-api/templates/api-worker.yml b/charts/platform-api/templates/api-worker.yml index f1acd8d..c53d89b 100644 --- a/charts/platform-api/templates/api-worker.yml +++ b/charts/platform-api/templates/api-worker.yml @@ -172,6 +172,18 @@ spec: value: "tcp://{{ .Values.config.redis.host }}:{{ .Values.config.redis.port }}" - name: PHP_EXEC_TIME_LIMIT value: {{ .Values.api.params.php_exec_time_limit | quote }} + - name: PHPFPM_PM_MAX_CHILDREN + value: {{ .Values.api.params.phpfpm_pm_max_children | quote }} + - name: PHPFPM_PM_START_SERVERS + value: {{ .Values.api.params.phpfpm_pm_start_servers | quote }} + - name: PHPFPM_PM_MIN_SPARE_SERVERS + value: {{ .Values.api.params.phpfpm_pm_min_spare_servers | quote }} + - name: PHPFPM_PM_MAX_SPARE_SERVERS + value: {{ .Values.api.params.phpfpm_pm_max_spare_servers | quote }} + - name: PHPFPM_PM_PROCESS_IDLE_TIMEOUT + value: {{ .Values.api.params.phpfpm_pm_process_idle_timeout | quote }} + - name: PHPFPM_PM_MAX_REQUESTS + value: {{ .Values.api.params.phpfpm_pm_max_requests | quote }} - name: PHP_UPLOAD_MAX_FILESIZE value: {{ .Values.api.params.upload_max_filesize | quote }} - name: PHP_POST_MAX_SIZE diff --git a/charts/platform-api/values.yaml b/charts/platform-api/values.yaml index 33b9f1b..ba0146e 100644 --- a/charts/platform-api/values.yaml +++ b/charts/platform-api/values.yaml @@ -117,6 +117,12 @@ api: debug: "False" params: php_exec_time_limit: 60 + phpfpm_pm_max_children: 5 + phpfpm_pm_start_servers: 2 + phpfpm_pm_min_spare_servers: 1 + phpfpm_pm_max_spare_servers: 3 + phpfpm_pm_process_idle_timeout: "10s" + phpfpm_pm_max_requests: 500 upload_max_filesize: 2m # this should match the value below with units image_max_size: '2000000' # this should match the previous value but in bytes limits: