From 34f7fca147c2b49ffc902c66377187c22f6640d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Garn=C3=A6s?= Date: Tue, 19 Dec 2023 12:45:22 +0100 Subject: [PATCH] Reduce request memory to 10MB. This is based on a sample of 10.000 requests after launching on Platform.sh: platform log --lines 10000 php.access | awk '{print $6}' | sort -n | uniq -c Reading log file 4yowr4fumu456-master-7rqtwti--app@ssh.fr-3.platform.sh:/var/log/php.access.log 9598 2048 401 4096 1 6144 We might even be able to go lower but 10MB is the minimum value on Platform.sh. https://docs.platform.sh/languages/php/fpm.html#2-adjust-the-maximum-number-of-php-fpm-workers --- .platform.app.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.platform.app.yaml b/.platform.app.yaml index 95ea3b8..ec8f3a3 100644 --- a/.platform.app.yaml +++ b/.platform.app.yaml @@ -6,7 +6,10 @@ type: 'php:7.4' runtime: sizing_hints: - request_memory: 20 + # A lean stack means that application memory usage is low. + # This allows us to have many workers which is useful as most time is spent + # waiting for token authorization. + request_memory: 10 # The build-time dependencies of the app. dependencies: