Zend OPcache in Production: Sizing, Deploy Clears and the Counters That Prove It
OPcache caches compiled PHP opcodes in shared memory. Here is a production php.ini, how to size it from its restart counters, and why deploys go stale.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
OPcache caches compiled PHP opcodes in shared memory. Here is a production php.ini, how to size it from its restart counters, and why deploys go stale.
Goal Determine whether the default MaxRequestWorkers setting is a bottleneck when Yunohost handles many simultaneous web requests. Constraints Yunohost installs Apache with MaxRequestWorkers=150 by default. The bundled PHP‑FPM pool is configured with 5 workers (pm.max_children). Increasing worker counts raises memory consumption, risking swap. No automatic t
Goal Determine how far the built‑in graceful shutdown of laminas-httphandlerrunner 's RequestHandlerRunner extends when the application runs behind PHP‑FPM rather than a long‑running async SAPI. Constraints and uncertainty Signal‑based shutdown is opt‑in and requires the pcntl extension, which is often unavailable or restricted in shared hosting. In PHP‑FPM
Laravel's HTTP Client leverages Guzzle to handle outgoing requests, relying on the underlying cURL extension or PHP stream wrappers for DNS resolution. While the connect_timeout option can manage the initial connection attempt, the framework does not provide a native abstraction for managing the DNS cache TTL. In a PHP-FPM environment, where worker processes
PHP set_time_limit() and PHP-FPM request_terminate_timeout coordination The goal is to allow a long‑running PHP script to clean up resources when either the internal execution limit or the FPM hard timeout is reached, without relying on external process management. While set_time_limit() can reset or extend the CPU‑time limit tracked by PHP, the FPM setting
The goal is to decide whether enabling the DoctrineBundle persistent option (which sets PDO::ATTR_PERSISTENT ) is advisable when running Symfony under PHP‑FPM, weighing the benefit of reduced connection churn against the risk of exhausting the database’s max_connections due to each PHP‑FPM worker maintaining its own persistent connection. Constraints include
Process Management in Repeatable Environments Standardizing development environments using official PHP Docker images often involves choosing between different PHP-FPM process manager modes. While the shared-nothing architecture simplifies state management, the behavior of the process manager directly impacts resource predictability within constrained contai
Goal: Determine the appropriate PHP-FPM pm.max_children value that prevents intermittent MySQL 'Too many connections' errors when MODX Revolution's xPDO persistent_connection system setting is enabled. Constraints/uncertainty: xPDO reuses a single PDO instance per request but does not share persistent connections across separate PHP-FPM workers; idle persist