Tagged articles
PHP-FPM
55 articles · Page 1 of 1
PHP has released security updates for versions 8.5.12, 8.4.27, 8.3.36, and 8.2.35 to fix two critical unauthenticated remote code execution vulnerabilities (CVE-2026-109618 and CVE-2026-109619) rated CVSS 9.2, with mitigation steps for those unable to patch immediately.
CVE-2026-109618CVE-2026-109619CVSS 9.2
0 likes · 9 min read

A legacy PHP 7.2 project with 8.2s average response time was optimized to 1.4s in two weeks through seven fundamental fixes: enabling OPcache, eliminating N+1 queries via eager loading, adding composite database indexes, implementing Redis caching layers, setting HTTP timeouts for external calls, right-sizing PHP-FPM workers, and separating API middleware from web routes.
LaravelN+1 QueryOPcache
0 likes · 12 min read

The article explains how S6 Overlay, a lightweight C‑based process supervisor designed for containers, coordinates PHP‑FPM and a reverse‑proxy (NGINX or Apache) within a single Docker image, detailing its health‑check behavior, custom initialization steps, and comparing its benefits and drawbacks against traditional Supervisor.
Container HealthDockerNGINX
0 likes · 11 min read

This comprehensive guide explains the differences between Nginx 502 and 504 errors, provides step‑by‑step troubleshooting procedures, detailed configuration examples, one‑click diagnostic scripts, real‑world case studies, best‑practice optimizations, monitoring setups, and advanced learning paths to help you quickly resolve gateway issues and improve server reliability.
502504NGINX
0 likes · 26 min read

This guide walks through diagnosing intermittent 502 Bad Gateway errors in Nginx by analyzing error logs, checking upstream and FastCGI timeout settings, reviewing PHP‑FPM configuration, performing performance tuning, and outlining advanced troubleshooting, monitoring, and capacity‑planning strategies to ensure stable high‑traffic deployments.
502NGINXPHP-FPM
0 likes · 9 min read

This article walks through a real‑world 502 outage, explains why the error is rarely a simple gateway failure, shows how to use enhanced Nginx upstream logs and automated scripts to pinpoint timeouts, misconfigurations, and database bottlenecks, and provides concrete tuning, monitoring, and self‑healing measures to stop the problem from recurring.
502MySQLNGINX
0 likes · 11 min read

This guide explains the limitations of the static swoole‑cli build, introduces the new glibc‑linked version in v6.1.3, and provides step‑by‑step commands for installing the .deb or .rpm packages, running PHP‑FPM, starting the CLI HTTP server, using Composer, and loading additional PHP extensions.
DebDockerPHP-FPM
0 likes · 15 min read

This article explains the roles of PHP-FPM and Nginx, illustrates forward and reverse proxy concepts, details the FastCGI communication workflow, and provides step‑by‑step configuration examples for TCP and Unix sockets, including fastcgi_pass and fastcgi_params settings.
NGINXPHPPHP-FPM
0 likes · 9 min read

Learn practical techniques to monitor OPcache, adjust PHP‑FPM settings, reset caches, employ preload, and use shared memory caching, enabling you to identify and mitigate PHP performance degradation in production without restarting services, ensuring continuous user experience.
BackendOPcachePHP
0 likes · 6 min read

This article examines PHP-FPM's historical strengths, its growing incompatibilities with containerized and micro‑service architectures, outlines three key bottlenecks, and presents modern alternatives such as Swoole, FrankenPHP, and serverless runtimes that enable higher performance, better resource efficiency, and improved observability.
ContainerizationPHP-FPMSwoole
0 likes · 7 min read

This guide walks through setting up FrankenPHP on Ubuntu, integrating it with Laravel and Octane, configuring Caddy, and benchmarking performance against traditional Nginx + PHP‑FPM, showing significant speed improvements.
CaddyDockerFrankenPHP
0 likes · 9 min read

This article provides an extensive overview of Nginx, covering its high‑performance features, module types, master‑worker process model, asynchronous event handling, FastCGI and PHP‑FPM integration, detailed configuration examples, tuning techniques such as epoll, TCMalloc, kernel parameters, and common error troubleshooting, while also highlighting a critical security vulnerability.
PHP-FPMfastcgi
0 likes · 47 min read

This article provides a comprehensive overview of Nginx's high‑performance architecture, including its core, basic and third‑party modules, master‑worker process model, asynchronous event handling with epoll, FastCGI and PHP‑FPM integration, as well as detailed configuration and optimization techniques for production deployments.
BackendNGINXPHP-FPM
0 likes · 47 min read

This comprehensive guide explains Nginx's high‑performance architecture, module system, multi‑process model, FastCGI integration, configuration best practices, tuning techniques, error troubleshooting, and a known PHP‑related vulnerability, providing practical steps for optimal deployment on Linux servers.
LinuxNGINXPHP-FPM
0 likes · 47 min read

This article provides a comprehensive overview of Nginx’s high‑performance features, module architecture, process and I/O models, FastCGI integration with PHP‑FPM, configuration best practices, tuning techniques, and common error troubleshooting, offering practical guidance for optimizing and securing Nginx deployments.
LinuxNGINXPHP-FPM
0 likes · 46 min read

Learn how to install Caddy 2, set up system services, configure global and site-specific Caddyfiles, and integrate PHP‑FPM, covering static site hosting, reverse proxy, HTTP redirects, and troubleshooting, with step‑by‑step commands and code examples for seamless migration from Apache or Nginx.
CaddyConfigurationLinux
0 likes · 7 min read

This guide explains why and how to replace the single‑threaded Apache httpd service with Nginx for Zabbix, covering installation of Nginx and PHP‑FPM, configuration adjustments, service restarts, and timezone fixes to ensure the Zabbix web interface works correctly.
ApacheNGINXPHP-FPM
0 likes · 5 min read

This article explains how PHP‑FPM and Nginx interact via FastCGI, detailing the roles of master and worker processes, configuration directives, and the differences between TCP and Unix socket communication methods.
PHP-FPMTCP socketUnix socket
0 likes · 7 min read

This article explains the three main configuration parameters—fastcgi_read_timeout, max_execution_time, and request_terminate_timeout—that affect PIE service interface timeout, demonstrates how each influences HTTP response codes and PHP execution, and provides step‑by‑step debugging and fixes for Nginx, PHP, and PHP‑FPM settings.
BackendPHP-FPMTimeout
0 likes · 9 min read

This article explains how to fine‑tune PHP‑FPM by adjusting key settings in php‑fpm.conf and pool.d/www.conf, covering user/group, listen address, process management, child limits, timeout values, and provides a fully commented example configuration to improve backend performance and stability.
NGINXPHP-FPM
0 likes · 6 min read

This article explains common reasons why PHP-FPM processes may terminate unexpectedly and provides step‑by‑step instructions for configuring systemd and Supervisor to supervise PHP‑FPM, ensuring continuous and reliable operation on Linux servers.
BackendLinuxPHP-FPM
0 likes · 4 min read

This guide explains common causes of 502 Bad Gateway in Nginx‑PHP‑MySQL stacks—such as memory limits, PHP‑FPM process settings, buffer sizes, timeouts, and system limits—and provides detailed configuration adjustments and command‑line checks to eliminate the errors.
502 errorPHP-FPMPerformance Tuning
0 likes · 6 min read

This article explains how to properly set file and process permissions for Nginx, PHP‑FPM, and MySQL on Linux servers, recommending the use of a dedicated www user group, showing configuration snippets, and illustrating how to verify running processes to enhance security and avoid permission‑related errors.
LinuxMySQLNGINX
0 likes · 5 min read

This article explains the role of PHP‑FPM as a FastCGI process manager, describes how Nginx acts as a reverse proxy, details the communication steps between them, and provides practical configuration snippets for both TCP and Unix domain sockets.
PHP-FPMServer configurationfastcgi
0 likes · 9 min read

This tutorial walks through installing Docker on macOS, configuring a fast Chinese mirror, and using Docker commands to pull, run, and link MySQL, Nginx, and PHP‑FPM containers, including volume mounting, configuration file adjustments, and installing common PHP extensions.
DockerNGINXPHP-FPM
0 likes · 10 min read

This article explains the meaning of Nginx upstream directives max_fails and fail_timeout, shows their default values, walks through a step‑by‑step experiment with two PHP‑FPM backends, and clarifies common misconceptions about failure handling and timeout settings.
BackendNGINXPHP-FPM
0 likes · 6 min read

This article explains the meaning of Nginx upstream directives max_fails and fail_timeout, demonstrates their behavior with a PHP‑FPM test setup, and clarifies common misconceptions and best‑practice settings for reliable load balancing.
OperationsPHP-FPMfail_timeout
0 likes · 6 min read

This article walks through a real‑world LNMP case where slow backend responses and 502 errors were diagnosed and resolved by analyzing Nginx logs, increasing file descriptor limits, adjusting FastCGI timeouts, and fine‑tuning PHP‑FPM settings, followed by performance testing with ApacheBench.
LNMPLinuxNGINX
0 likes · 9 min read

This article introduces the FastCGI protocol, explains Swoole's task processes, demonstrates how to use the coroutine FastCGI client to invoke PHP‑FPM scripts and concurrently handle blocking calls, and shows a one‑click WordPress proxy implementation with performance benchmarks.
PHP-FPMSwooleWordPress
0 likes · 10 min read

This article provides a detailed translation and explanation of the FastCGI protocol specification, covering its architecture, record types, roles, and implementation details for developers working with PHP-FPM and web servers like nginx.
Application DevelopmentCGIPHP-FPM
0 likes · 32 min read

This step‑by‑step guide shows how to install and configure Lighttpd on a Raspberry Pi, replace Apache, enable PHP‑FPM, adjust FastCGI settings, and verify the web server works with both static HTML and PHP pages.
LighttpdPHP-FPMRaspberry Pi
0 likes · 5 min read

This guide explains how to enable status modules for Nginx, MySQL and PHP‑FPM, write Bash monitoring scripts, configure Zabbix agent user parameters, create Zabbix templates, add items, triggers and graphs, and verify monitoring of all components including the Zabbix server itself.
LinuxMySQLPHP-FPM
0 likes · 16 min read

This article explains the internal architecture of PHP‑FPM, covering its startup sequence, master‑worker process management, event‑driven loop, signal handling, shared‑memory scoreboard implementation, and the overall request lifecycle, with detailed code excerpts and diagrams.
BackendPHP-FPMProcess Management
0 likes · 23 min read


21CTODec 1, 2017 · Backend Development
This article explains how to fine‑tune PHP‑FPM by choosing the optimal Process Manager mode—static, dynamic, or ondemand—combined with CPU governor settings to achieve higher throughput, lower latency, and stable CPU/memory usage on web servers.
PHP-FPMcpu governorperformance
0 likes · 9 min read

This article explains how tuning the PHP‑FPM max_requests setting and modifying its source code can eliminate periodic CPU_IDLE and MEM_USED fluctuations in high‑traffic web services, resulting in smoother resource utilization and more reliable performance.
Backend PerformanceCPU optimizationMemory usage
0 likes · 6 min read

This guide walks through configuring Zabbix to monitor Nginx and PHP‑FPM status, covering software installation paths, enabling status modules, creating extraction scripts, setting up Zabbix agent userparameters, restarting services, testing data retrieval, and adding server‑side templates for items, triggers, and graphs.
LinuxNGINXPHP-FPM
0 likes · 9 min read


21CTOMar 22, 2017 · Backend Development
This article explains how PHP, as a scripted language, is compiled to intermediate code and run by the Zend virtual machine, detailing the VM’s role, JIT compilation, execution stacks, php‑fpm workflow, and key questions about OpCache and configuration loading.
PHPPHP-FPMZend engine
0 likes · 5 min read

This article describes how adjusting the PHP‑FPM max_requests setting and modifying its source code can smooth CPU idle and memory usage fluctuations in a high‑traffic online service, improving resource stability and reliability.
CPUMemoryPHP-FPM
0 likes · 5 min read

This tutorial walks through creating a self‑signed CA, generating keys and CSR, signing certificates, configuring nginx.conf for SSL, using the rewrite module, setting up fastcgi with PHP‑FPM, and testing the entire HTTPS setup on a Linux server.
HTTPSNGINXPHP-FPM
0 likes · 7 min read

This article explains the evolution from LAMP to LNMP, details how Nginx interacts with PHP‑FPM via CGI/FastCGI, compares Nginx and Apache processing models, and introduces LORMP (OpenResty + Lua) with configuration and code examples for building high‑performance backend web services.
LNMPOpenRestyPHP-FPM
0 likes · 18 min read


21CTODec 17, 2016 · Backend Development
This article explains php-fpm’s three process management modes—ondemand, dynamic, and static—detailing their operation principles, configuration requirements, and the advantages and disadvantages of each for high‑traffic web services.
BackendPHP-FPMProcess Management
0 likes · 7 min read

This article introduces phptrace, an open‑source PHP execution tracing tool, explains how to print a PHP process's call stack and perform real‑time tracing, and shows practical use cases for debugging and performance analysis in development and production environments.
PHP-FPMbackend developmentperformance tracing
0 likes · 8 min read


ITPUBNov 15, 2016 · Operations
This article shows how to detect a CPU0 load imbalance on a multi‑core web server, confirms PHP‑FPM as the cause with mpstat and pidstat, and provides a Bash script that uses taskset to evenly distribute PHP‑FPM processes across all CPUs, plus a cron tip to keep the setting persistent.
CPU affinityPHP-FPMmpstat
0 likes · 6 min read

This article shares a practical template for optimizing web service performance, covering kernel sysctl tweaks, file‑handle limits, and Nginx/PHP‑FPM configuration adjustments to eliminate bottlenecks and maximize throughput under high traffic conditions.
OperationsPHP-FPMSystem Optimization
0 likes · 5 min read

This article explains how Nginx and PHP‑FPM work together, details their configuration directives, describes common 502/504 errors, and provides practical tuning tips to improve performance and reliability of PHP‑based web services.
BackendNGINXPHP-FPM
0 likes · 10 min read


ITPUBJun 14, 2016 · Operations
This guide explains why Nginx returns 502 Bad Gateway, outlines common trigger conditions, and provides step‑by‑step commands and configuration tweaks—such as adjusting FastCGI process limits, timeout values, buffer sizes, and php‑fpm settings—to reliably resolve the issue.
502NGINXPHP-FPM
0 likes · 8 min read


21CTOJun 10, 2016 · Backend Development
This article explains the role of CGI as a protocol for passing request data, how FastCGI improves performance by reusing processes, and why PHP‑FPM is the widely adopted FastCGI implementation that enables smooth configuration reloads for PHP applications.
CGIPHP-FPMfastcgi
0 likes · 6 min read

This guide explains what PHP‑FPM is, walks through its installation, dissects the install script, covers common parameters and advanced commands, and then teaches how to inspect, verify, test, and build RPM packages on Linux systems.
LinuxPHP-FPMRPM
0 likes · 4 min read

This tutorial walks through setting up a complete LAMP environment on two CentOS machines, covering compilation of APR, APR‑util, Apache 2.4, MariaDB, PHP (both mod_php and PHP‑FPM), XCache integration, and configuring Apache to proxy PHP‑FPM requests, with full command‑line examples and verification steps.
CentOSLAMPMariaDB
0 likes · 16 min read

This guide walks through the complete setup of a load‑balanced Discuz forum using NFS for shared storage, MySQL, PHP‑FPM, and Apache across two front‑end web servers, covering NFS fundamentals, security, configuration files, and step‑by‑step commands for each component.
DiscuzMySQLNFS
0 likes · 19 min read

This article walks you through preparing Docker, building a csphere/php-fpm:5.4 image with custom configuration files, creating a csphere/mysql:5.5 image, using ONBUILD, managing volumes, and running containers to demonstrate persistent data across container lifecycles.
ContainerizationDevOpsDockerfile
0 likes · 11 min read

This guide shares practical, experience‑backed techniques for optimizing Nginx and PHP‑FPM on high‑traffic Linux servers, covering UNIX sockets, worker processes, upstream load balancing, logging, compression, caching, timeouts, buffer sizes, kernel tweaks, and monitoring.
NGINXOperationsPHP-FPM
0 likes · 9 min read

This article explains php‑fpm’s architecture—prefork with async I/O, configurable event mechanisms, and its concurrency model identical to nginx—while offering practical configuration tips such as optimal worker counts and highlighting stability considerations compared to nginx and OpenResty.
BackendNGINXPHP-FPM
0 likes · 6 min read

This guide shows how to configure Nginx and php‑fpm to expose a status page, explains the necessary settings, and provides a sample output to help you monitor PHP request handling and fine‑tune performance parameters.
BackendPHP-FPMserver monitoring
0 likes · 2 min read

This guide explains how to secure Nginx + PHP‑FPM by configuring php‑fpm.conf, adding fastcgi_param directives, editing php.ini, or using a .user.ini file to enforce open_basedir restrictions and prevent cross‑site and cross‑directory access, while also enabling slow‑log monitoring for performance.
PHP-FPMfastcgiopen_basedir
0 likes · 4 min read
