Skip to content

perf(worker): opt-in FrankenPHP/Symfony worker mode (PRISMARR_WORKER) - #95

Open
ndandan wants to merge 2 commits into
Shoshuo:mainfrom
ndandan:pr/worker-mode
Open

perf(worker): opt-in FrankenPHP/Symfony worker mode (PRISMARR_WORKER)#95
ndandan wants to merge 2 commits into
Shoshuo:mainfrom
ndandan:pr/worker-mode

Conversation

@ndandan

@ndandan ndandan commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Setting PRISMARR_WORKER=1 boots the Symfony kernel once and keeps it
resident, skipping the per-request bootstrap. OFF by default (classic
per-request mode unchanged); PRISMARR_WORKER_NUM pins the worker count.
No APP_RUNTIME or extra Composer package — Symfony's default runtime
drives FrankenPHP's worker loop. HealthService and DashboardController
now implement ResetInterface so their per-request memo is cleared
between requests (also fixes a latent staleness edge in classic mode).

ndandan and others added 2 commits August 21, 2026 21:31
Setting PRISMARR_WORKER=1 boots the Symfony kernel once and keeps it
resident, skipping the per-request bootstrap. OFF by default (classic
per-request mode unchanged); PRISMARR_WORKER_NUM pins the worker count.
No APP_RUNTIME or extra Composer package — Symfony's default runtime
drives FrankenPHP's worker loop. HealthService and DashboardController
now implement ResetInterface so their per-request memo is cleared
between requests (also fixes a latent staleness edge in classic mode).
…ISMARR_WORKER_NUM

Two hardening fixes to the env parse:

- PRISMARR_WORKER now enables worker mode only on explicit truthy values
  (1/true/yes/on or a positive integer); any unrecognized value (e.g.
  "disabled", "none", "OFF " with a stray space) logs a warning and stays
  in classic mode instead of silently enabling a mode that changes
  request-isolation semantics.
- PRISMARR_WORKER_NUM is interpolated verbatim into the Caddyfile's global
  frankenphp{} block, so a non-integer value used to fail Caddy's parse and
  restart-loop the whole container. It is now accepted only as a pure
  positive integer; anything else is ignored with a warning.

Parse matrix verified for 17 input combinations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant