From a6bf507fc14bcb53c4df02e7fa250e209cdd738a Mon Sep 17 00:00:00 2001 From: fxck Date: Thu, 2 Jul 2026 15:21:55 +0000 Subject: [PATCH] WordPress: set minRam floors so first-boot install doesn't OOM Every app service runs `wp core install` at first boot (base initCommands, gated by zsc execOnce). On the 0.125 GB platform default, that spike (php-fpm ~113 MB + wp-cli ~90 MB) OOM-killed the init process, and --retryUntilSuccessful turned it into a crash loop. verticalAutoscaling reacts too slowly for a sub-second spike, so the floor must absorb it. - AI Agent appdev + Remote (CDE) app: minRam 1 + maxContainers 1 (dev workstations also run composer/wp-cli in-container over SSH; dev uses SSHFS so pin a single container). - AI Agent appstage + Stage app: minRam 0.5 (install-spike only). - HA Production app: minRam 0.5 under the existing cpuMode DEDICATED (0.5, not 1, to avoid wasting RAM across up to 6 dedicated containers; steady-state scales up from the floor). - Small Production already had minRam 0.5; Local has no app service. Co-Authored-By: Claude Opus 4.8 (1M context) --- "wordpress/0 \342\200\224 AI Agent/import.yaml" | 9 +++++++++ "wordpress/1 \342\200\224 Remote (CDE)/import.yaml" | 5 +++++ "wordpress/3 \342\200\224 Stage/import.yaml" | 3 +++ .../import.yaml" | 3 +++ 4 files changed, 20 insertions(+) diff --git "a/wordpress/0 \342\200\224 AI Agent/import.yaml" "b/wordpress/0 \342\200\224 AI Agent/import.yaml" index 13f9d47..e4706fa 100644 --- "a/wordpress/0 \342\200\224 AI Agent/import.yaml" +++ "b/wordpress/0 \342\200\224 AI Agent/import.yaml" @@ -37,6 +37,12 @@ services: zeropsSetup: dev buildFromGit: https://github.com/zerops-recipe-apps/wordpress-app enableSubdomainAccess: true + # Dev workstation: pin a single container (dev uses SSHFS — multiple would + # conflict) and floor RAM at 1 GB to absorb the first-boot `wp core install` + # spike plus on-container composer/wp-cli over SSH (autoscaling reacts too slowly). + maxContainers: 1 + verticalAutoscaling: + minRam: 1 envSecrets: WORDPRESS_TITLE: WordPress on Zerops WORDPRESS_ADMIN_USER: zadmin @@ -58,6 +64,9 @@ services: zeropsSetup: prod buildFromGit: https://github.com/zerops-recipe-apps/wordpress-app enableSubdomainAccess: true + # Floor RAM at 0.5 GB to cover the first-boot `wp core install` spike. + verticalAutoscaling: + minRam: 0.5 envSecrets: WORDPRESS_TITLE: WordPress on Zerops WORDPRESS_ADMIN_USER: zadmin diff --git "a/wordpress/1 \342\200\224 Remote (CDE)/import.yaml" "b/wordpress/1 \342\200\224 Remote (CDE)/import.yaml" index d4a8f72..1048056 100644 --- "a/wordpress/1 \342\200\224 Remote (CDE)/import.yaml" +++ "b/wordpress/1 \342\200\224 Remote (CDE)/import.yaml" @@ -33,6 +33,11 @@ services: zeropsSetup: dev buildFromGit: https://github.com/zerops-recipe-apps/wordpress-app enableSubdomainAccess: true + # Dev workstation: pin a single container (dev uses SSHFS) and floor RAM at 1 GB + # to absorb the first-boot `wp core install` spike plus on-container composer/wp-cli. + maxContainers: 1 + verticalAutoscaling: + minRam: 1 envSecrets: WORDPRESS_TITLE: WordPress on Zerops WORDPRESS_ADMIN_USER: zadmin diff --git "a/wordpress/3 \342\200\224 Stage/import.yaml" "b/wordpress/3 \342\200\224 Stage/import.yaml" index 5202ddb..0806cbe 100644 --- "a/wordpress/3 \342\200\224 Stage/import.yaml" +++ "b/wordpress/3 \342\200\224 Stage/import.yaml" @@ -32,6 +32,9 @@ services: zeropsSetup: prod buildFromGit: https://github.com/zerops-recipe-apps/wordpress-app enableSubdomainAccess: true + # Floor RAM at 0.5 GB to cover the first-boot `wp core install` spike. + verticalAutoscaling: + minRam: 0.5 envSecrets: WORDPRESS_TITLE: WordPress on Zerops WORDPRESS_ADMIN_USER: zadmin diff --git "a/wordpress/5 \342\200\224 Highly-available Production/import.yaml" "b/wordpress/5 \342\200\224 Highly-available Production/import.yaml" index 4122498..8bc5b53 100644 --- "a/wordpress/5 \342\200\224 Highly-available Production/import.yaml" +++ "b/wordpress/5 \342\200\224 Highly-available Production/import.yaml" @@ -24,6 +24,9 @@ services: maxContainers: 6 verticalAutoscaling: cpuMode: DEDICATED + # Floor RAM at 0.5 GB per container to cover the first-boot `wp core install` + # spike (both min containers boot cold); steady-state scales up from here. + minRam: 0.5 envSecrets: WORDPRESS_TITLE: WordPress on Zerops WORDPRESS_ADMIN_USER: zadmin