Optimize Apache & PHP-FPM memory for lower idle usage
All checks were successful
Cloud Apache Container / Build-and-Push (74) (push) Successful in 2m31s
Cloud Apache Container / Build-and-Push (80) (push) Successful in 1m54s
Cloud Apache Container / Build-and-Push (81) (push) Successful in 1m51s
Cloud Apache Container / Build-and-Push (82) (push) Successful in 1m52s
Cloud Apache Container / Build-and-Push (83) (push) Successful in 2m39s
Cloud Apache Container / Build-and-Push (84) (push) Successful in 1m58s
Cloud Apache Container / Build-and-Push (85) (push) Successful in 1m51s

Switch PHP-FPM from pm=dynamic to pm=ondemand (zero idle workers),
auto-detect container memory via cgroups to calculate appropriate
limits, and generate Apache MPM config at runtime. All tuning values
are now overridable via environment variables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 18:52:15 -08:00
parent a153385d8f
commit 87c4f2befc
5 changed files with 144 additions and 19 deletions

View File

@@ -1,13 +1,2 @@
DirectoryIndex index.html index.htm index.php
Alias "/ping" "/var/www/html"
<IfModule mpm_event_module>
StartServers 2
MinSpareThreads 10
MaxSpareThreads 25
ThreadLimit 64
ThreadsPerChild 25
MaxRequestWorkers 75
ServerLimit 3
MaxConnectionsPerChild 1000
</IfModule>
Alias "/ping" "/var/www/html"