Skip to content

[app] Runtime config tuning: php-fpm pool, FPM access log, opcache, redis eviction policy #37

Description

@henzigo

Context

The shipped runtime configuration carries legacy defaults worth revisiting:

  • php-fpm pool undersized: pm.max_children = 20 caps concurrency at 20 requests
    per pod while the memory limit would fit ~60 workers; spikes ≥20 → 502s from nginx
  • access.log = /dev/null: FPM access log (CPU time, memory peak per request) is
    thrown away; should go to stdout with a useful format + slowlog to stderr
  • opcache interned_strings_buffer = 24 is small for a Symfony/Shopsys codebase
    (recommend 64) — memory_consumption review included; **** optional JIT for CLI/cron
  • redis maxmemory-policy volatile-lru evicts only TTL'd keys — keys without TTL
    can push redis to OOM errors; decide volatile-lru (and guarantee TTLs app-side) vs allkeys-lru
  • **** maxmemory 2200mb vs pod limit 2500Mi is intentional headroom — parametrize
    maxmemory from the values (derive from redis.resources.limits.memory) or document
  • **** redis slowlog tuning (slowlog-log-slower-than 5000, slowlog-max-len 128)

Proposal

All of these live in values already (webserver.phpFpm.config, .opcacheConfig,
redis.config) — change the shipped defaults, with load-test/metrics validation for the
php-fpm pool sizing (correlates with the memory request change in #35).

Tasks

  • php-fpm pool sizing (validated by load test on a reference project)
  • FPM access log to stdout + slowlog
  • opcache tuning (+ JIT decision for CLI)
  • redis eviction policy decision + maxmemory parametrization + slowlog
  • Golden snapshots, deviations entries

Related: #35

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/app-chartshopsys-app chart (workloads, ingresses, secrets, hooks)area/infra-chartshopsys-infra chart (Redis, RabbitMQ, RBAC)behavior-changechanges rendered manifests - regenerate golden snapshots + update deviations docenhancementNew feature or requestpriority/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions