Composer on E-01: a separate Symfony build budget

A verified Composer PHAR, installation from composer.lock and production warmup, with separate limits for the build, child PHP and persistent FPM.

Wooden pieces assembled into a cube beneath a workshop press.

Composer: an exact file and a separate build

In the earlier manual native run, packaged Composer 2.8.8 stopped with a callback TypeError under PHP 8.5. I selected the official Composer 2.10.3 PHAR for the next run. This is one specific observation, not a conclusion about every Debian installation. A separate installation and check of the new file have now also completed on the learning E-01.

Checking the file

These are standard commands for repeating the readback. The pinned version and SHA-256 describe /usr/local/bin/composer, not any other composer command found through PATH. I read its version through an explicitly selected PHP. Selected actual values follow the commands; this is a shortened presentation of observations, not a complete shell transcript.

sha256sum /usr/local/bin/composer
php8.5 /usr/local/bin/composer --version
7a2d379d5b8ffdaa028580ef26494c36d2feef4b178d3dd1473a4dbc5e17c8d6  /usr/local/bin/composer
Composer version: 2.10.3

Composer 2.10.3 PHAR

A separate build budget

The build had MemoryMax=768M and CPUQuota=100%. These are limits for the entire service: CPUQuota=100% represents one CPU budget, not necessarily all server CPU capacity. Both parent and child PHP had memory_limit=512M. Checking the child matters because Composer scripts can start a new PHP process that will not inherit a local -d option from the previous invocation.

The standard service properties and grouped actual observations appear below. MemoryMax applies to the cgroup, while memory_limit concerns PHP accounting; these numbers do not add up to two independent RAM reservations. Nor does every child receive its own 768 MiB. The example commands use an explicit -d option; those two commands do not reproduce the complete isolated build execution.

To give child PHP the same 512M limit, the build used a root-owned 99-memory.ini containing memory_limit=512M. PHP_INI_SCAN_DIR retained the standard CLI scan directory and appended this override directory. This applied to build processes; the private FPM scan directory stayed unchanged.

PHP_INI_SCAN_DIR=/etc/php/8.5/cli/conf.d:/etc/deploy-cli-build-php85-512
MemoryMax=768M
CPUQuota=100%
{
  "parent_php_memory_limit": "512M",
  "child_php_memory_limit": "512M",
  "build_cgroup_memory_max_bytes": 805306368
}

Installation and production cache

E-01 installed 32 packages without development dependencies from published source for the official Symfony skeleton, then completed production cache warmup. A new SSH connection provided a separate readback. Install reads the pinned composer.lock; update would change the version selection here. A dedicated build identity had the necessary access to working directories; dependencies and scripts did not run as a root application process.

APP_ENV=prod APP_DEBUG=0 php8.5 -d memory_limit=512M /usr/local/bin/composer install --no-dev --prefer-dist --no-interaction --optimize-autoloader
APP_ENV=prod APP_DEBUG=0 php8.5 -d memory_limit=512M bin/console cache:warmup --env=prod --no-debug

After the build, root owns the code and the runtime user owns mutable var data. Persistent FPM retained memory_limit=64M and MemoryMax=384 MiB: the short build step and HTTP service have separate budgets. Successful warmup completes this stage; I examine the actual Nginx → FPM → Symfony path separately. A higher build budget is not, by itself, a load test of the future site.

Composer install · Symfony deployment · Nginx add_header

  1. PHP PHP and Composer: what to check beyond the version number
  2. Platform Engineering First Symfony site on a prepared stack: Composer and file permissions
  3. Observability E-01 resources before public access: RAM, disk and swap
  4. Platform Engineering Private Symfony on E-01: the Nginx → FPM → application path
  5. PHP PHP extensions on E-01: separate sets for CLI and FPM