Tagged articles
52 articles
Page 1 of 1
Raymond Ops
Raymond Ops
Apr 16, 2026 · Operations

Mastering Nginx 502/504 Errors: A Complete Troubleshooting Guide with Scripts

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
Mastering Nginx 502/504 Errors: A Complete Troubleshooting Guide with Scripts
Ray's Galactic Tech
Ray's Galactic Tech
Jan 9, 2026 · Operations

Why Does Nginx Return 502 Bad Gateway? A Complete Log‑to‑FastCGI Timeout Diagnosis

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.

502Nginxcapacity planning
0 likes · 9 min read
Why Does Nginx Return 502 Bad Gateway? A Complete Log‑to‑FastCGI Timeout Diagnosis
Xiao Liu Lab
Xiao Liu Lab
Dec 7, 2025 · Operations

How to Diagnose and Prevent 502 Bad Gateway Errors in an Nginx‑PHP‑MySQL Stack

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.

502NginxOperations
0 likes · 11 min read
How to Diagnose and Prevent 502 Bad Gateway Errors in an Nginx‑PHP‑MySQL Stack
php Courses
php Courses
Oct 28, 2025 · Backend Development

How to Diagnose and Fix PHP Performance Issues Without Restarting

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
How to Diagnose and Fix PHP Performance Issues Without Restarting
php Courses
php Courses
Oct 27, 2025 · Backend Development

Why PHP-FPM Struggles in Cloud‑Native Environments and What Modern Runtimes Offer

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.

ServerlessSwoolecloud-native
0 likes · 7 min read
Why PHP-FPM Struggles in Cloud‑Native Environments and What Modern Runtimes Offer
Top Architect
Top Architect
Nov 10, 2024 · Backend Development

Comprehensive Guide to Nginx Architecture, Process Model, FastCGI Integration, and Performance Optimization

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.

fastcgiphp-fpm
0 likes · 47 min read
Comprehensive Guide to Nginx Architecture, Process Model, FastCGI Integration, and Performance Optimization
Top Architect
Top Architect
Aug 15, 2024 · Backend Development

Understanding Nginx Architecture, Process Model, FastCGI Integration, and Performance Optimization

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.

BackendNginxWeb server
0 likes · 47 min read
Understanding Nginx Architecture, Process Model, FastCGI Integration, and Performance Optimization
Architect
Architect
Aug 9, 2024 · Backend Development

Why Nginx Outperforms Others: Deep Dive into Architecture, Modules, and Tuning

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.

LinuxNginxSecurity
0 likes · 47 min read
Why Nginx Outperforms Others: Deep Dive into Architecture, Modules, and Tuning
Open Source Tech Hub
Open Source Tech Hub
Feb 3, 2024 · Backend Development

Master Caddy 2: Install, Configure, and Integrate PHP for Fast Web Hosting

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
Master Caddy 2: Install, Configure, and Integrate PHP for Fast Web Hosting
Practical DevOps Architecture
Practical DevOps Architecture
Jan 18, 2024 · Operations

Migrating Zabbix Web Frontend from Apache to Nginx

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.

ApacheNginxSystem Administration
0 likes · 5 min read
Migrating Zabbix Web Frontend from Apache to Nginx
Beijing SF i-TECH City Technology Team
Beijing SF i-TECH City Technology Team
Aug 17, 2023 · Backend Development

Understanding and Troubleshooting PIE Service Interface Timeout in PHP/FPM

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.

BackendTimeoutphp-fpm
0 likes · 9 min read
Understanding and Troubleshooting PIE Service Interface Timeout in PHP/FPM
php Courses
php Courses
Jul 11, 2023 · Backend Development

Optimizing and Configuring PHP-FPM for Better Server Performance

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
Optimizing and Configuring PHP-FPM for Better Server Performance
php Courses
php Courses
Jul 9, 2023 · Backend Development

How to Daemonize PHP-FPM Using systemd and Supervisor

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.

BackendLinuxSupervisor
0 likes · 4 min read
How to Daemonize PHP-FPM Using systemd and Supervisor
php Courses
php Courses
Jun 14, 2022 · Operations

Permission Configuration for Nginx, PHP‑FPM, and MySQL on Linux Servers

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.

LinuxNginxPermissions
0 likes · 5 min read
Permission Configuration for Nginx, PHP‑FPM, and MySQL on Linux Servers
Liangxu Linux
Liangxu Linux
Jun 12, 2021 · Backend Development

How Nginx’s max_fails and fail_timeout Really Work: A Hands‑On Demo

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.

BackendNginxfail_timeout
0 likes · 6 min read
How Nginx’s max_fails and fail_timeout Really Work: A Hands‑On Demo
Beike Product & Technology
Beike Product & Technology
Jul 26, 2019 · Fundamentals

FastCGI Protocol Specification: A Comprehensive Guide

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 DevelopmentCGIWeb server
0 likes · 32 min read
FastCGI Protocol Specification: A Comprehensive Guide
Liangxu Linux
Liangxu Linux
Jul 11, 2019 · Backend Development

How to Set Up Lighttpd with PHP‑FPM on a Raspberry Pi

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.

LighttpdRaspberry Piphp-fpm
0 likes · 5 min read
How to Set Up Lighttpd with PHP‑FPM on a Raspberry Pi
21CTO
21CTO
Dec 1, 2017 · Backend Development

Boost PHP‑FPM Performance: Why pm‑static Beats Dynamic & ondemand

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.

cpu governorperformancephp-fpm
0 likes · 9 min read
Boost PHP‑FPM Performance: Why pm‑static Beats Dynamic & ondemand
Efficient Ops
Efficient Ops
Aug 7, 2017 · Backend Development

How Adjusting PHP‑FPM max_requests Stabilizes CPU and Memory Usage

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
How Adjusting PHP‑FPM max_requests Stabilizes CPU and Memory Usage
MaGe Linux Operations
MaGe Linux Operations
May 10, 2017 · Operations

Step‑by‑Step: Monitor Nginx and PHP‑FPM Status with Zabbix

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.

LinuxNginxOps
0 likes · 9 min read
Step‑by‑Step: Monitor Nginx and PHP‑FPM Status with Zabbix
21CTO
21CTO
Mar 22, 2017 · Backend Development

How Does PHP’s Zend Engine Execute Your Code? Inside the Virtual Machine

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.

PHPZend enginephp-fpm
0 likes · 5 min read
How Does PHP’s Zend Engine Execute Your Code? Inside the Virtual Machine
21CTO
21CTO
Dec 17, 2016 · Backend Development

Understanding php-fpm’s Three Process Modes: ondemand, dynamic, static

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.

Backendperformancephp-fpm
0 likes · 7 min read
Understanding php-fpm’s Three Process Modes: ondemand, dynamic, static
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
Dec 6, 2016 · Backend Development

How to Use phpTrace to Debug PHP Function Calls and Parameters

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.

Backend Developmentperformance tracingphp debugging
0 likes · 8 min read
How to Use phpTrace to Debug PHP Function Calls and Parameters
ITPUB
ITPUB
Nov 15, 2016 · Operations

How to Fix CPU0 Overload on Multi‑Core Web Servers Using taskset and PHP‑FPM

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 affinitympstatphp-fpm
0 likes · 6 min read
How to Fix CPU0 Overload on Multi‑Core Web Servers Using taskset and PHP‑FPM
ITPUB
ITPUB
Jun 14, 2016 · Operations

How to Diagnose and Fix Nginx 502 Bad Gateway Errors

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.

502NginxServer
0 likes · 8 min read
How to Diagnose and Fix Nginx 502 Bad Gateway Errors
MaGe Linux Operations
MaGe Linux Operations
Jan 8, 2016 · Operations

Mastering PHP‑FPM and RPM Packaging: A Complete Guide

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.

LinuxRPMSystem Administration
0 likes · 4 min read
Mastering PHP‑FPM and RPM Packaging: A Complete Guide
Efficient Ops
Efficient Ops
Jul 11, 2015 · Operations

Master Docker Middleware: Build PHP-FPM and MySQL Images Step‑by‑Step

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.

DevOpsDockerfilecontainerization
0 likes · 11 min read
Master Docker Middleware: Build PHP-FPM and MySQL Images Step‑by‑Step
MaGe Linux Operations
MaGe Linux Operations
Aug 15, 2014 · Backend Development

How to Enable and Use PHP‑FPM Status Page with Nginx

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.

BackendServer Monitoringphp-fpm
0 likes · 2 min read
How to Enable and Use PHP‑FPM Status Page with Nginx