Skip to content

Commit

Permalink
Reduce request memory to 10MB.
Browse files Browse the repository at this point in the history
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 [email protected]:/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
  • Loading branch information
kasperg committed Dec 19, 2023
1 parent 2a33403 commit 34f7fca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 34f7fca

Please sign in to comment.