Tagged articles
fastcgi
38 articles · Page 1 of 1
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.
502PHP-FPMcapacity planning
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.
502MySQLOperations
0 likes · 11 min read

Learn how Nginx’s powerful caching mechanism can slash response times by up to tenfold, reduce backend load, and increase throughput, with detailed explanations of the caching workflow, essential configuration directives, micro‑cache tricks, and FastCGI caching examples for high‑traffic services.
Backend PerformanceCachingConfiguration
0 likes · 5 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.
PHPPHP-FPMfastcgi
0 likes · 9 min read

This article provides a comprehensive overview of NGINX, covering its architecture, module types, multi‑process event model, FastCGI integration for PHP, configuration best practices, performance optimizations, error troubleshooting, and a notable security vulnerability.
LinuxSecurityfastcgi
0 likes · 44 min read

This course provides an in‑depth exploration of process fundamentals, socket programming with TCP/IP, Nginx and FASTCGI communication, host‑to‑network byte order conversion, and Redis basics, targeting backend engineers, system administrators, and network engineers seeking comprehensive backend development skills.
RedisSocketsbyte order
0 likes · 3 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


DevOpsAug 25, 2024 · Fundamentals
This article explains the complete journey of a web request—from IP addressing, DNS resolution, and CDN acceleration, through TCP stream handling and message framing, to CGI/FastCGI execution, server model choices, and the evolution of data-layer architectures for scalable applications.
CDNCGIDNS
0 likes · 21 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.
BackendPHP-FPMfastcgi
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.
LinuxPHP-FPMPerformance Tuning
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.
LinuxPHP-FPMfastcgi
0 likes · 46 min read

This guide compiles practical Nginx performance‑tuning directives, FastCGI settings, Linux kernel parameter adjustments, security hardening tips, and monitoring configurations, providing concrete examples and command‑line snippets to help sysadmins and developers optimize high‑concurrency web services.
fastcgikernelmonitoring
0 likes · 21 min read

This guide consolidates practical Nginx performance‑tuning directives, FastCGI settings, kernel parameter adjustments, monitoring configurations, and security hardening tips to help system administrators and DevOps engineers optimize high‑traffic web services on Linux.
fastcgiperformance
0 likes · 21 min read

This course offers an in‑depth exploration of process concepts, TCP/IP and Socket communication, Nginx‑FASTCGI integration, host‑to‑network byte order conversion, and Redis fundamentals, targeting backend developers, system administrators, and network engineers seeking comprehensive backend skill enhancement.
RedisSocketfastcgi
0 likes · 3 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 CGI protocol, how PHP implements it, the advantages of FastCGI as a persistent process manager, and how php-fpm extends FastCGI to provide smoother configuration changes and improved performance for PHP web applications.
CGIPHPfastcgi
0 likes · 3 min read

This article explains the origins, principles, and interactions of CGI, FastCGI, PHP‑FPM, WSGI, uWSGI, and ASGI, detailing how they enable dynamic Python web applications to communicate with web servers such as Nginx and Apache while addressing performance and concurrency concerns.
ASGICGIPython
0 likes · 17 min read

The PHP function fastcgi_finish_request flushes all pending response data to the client and terminates the request, allowing the server to continue executing time‑consuming tasks after the client connection has closed, and returns TRUE on success or FALSE on failure.
PHPfastcgiflush
0 likes · 1 min read

This article provides an in‑depth English overview of PHP’s SAPI architecture, detailing the CGI SAPI module structure, the core _sapi_module_struct and sapi_globals definitions, and walking through the startup sequence including sapi_startup, sapi_globals_ctor, and FastCGI initialization with code examples.
C++CGISAPI++
0 likes · 10 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 article explains the PHP framework's controller execution process, demonstrates how to use fastcgi_finish_request for asynchronous-like responses, and provides a detailed guide on PHP traits, including conflict resolution techniques, all illustrated with practical code examples.
fastcgitrait
0 likes · 10 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 guide walks through deploying a LAMP architecture with static‑dynamic separation, compiling PHP with FastCGI, configuring Apache proxy to PHP‑FPM, performing load testing using ApacheBench, installing XCache for PHP acceleration, and finally setting up a Discuz BBS forum, providing step‑by‑step commands and performance metrics.
ApacheBBSLAMP
0 likes · 24 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

An in‑depth guide explains the evolution from CGI to FastCGI, WSGI, uWSGI, Gunicorn and Tornado, detailing each protocol’s architecture, performance benefits, and deployment steps for Python web applications, helping developers choose the right server setup for production environments.
CGIGunicornPython
0 likes · 13 min read

This article compares Python web deployment options, explaining the concepts and workflows of CGI, FastCGI, WSGI, uWSGI, Gunicorn, Tornado, and related tools, and offers guidance on selecting the appropriate server and protocol for production environments.
CGIGunicornWSGI
0 likes · 14 min read

This article explains the key server interfaces and deployment options for Python web applications—including CGI, FastCGI, WSGI, uWSGI, Gunicorn, and Tornado—detailing their architectures, workflows, and practical usage with Nginx and process managers.
CGIGunicornWSGI
0 likes · 15 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 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.
HTTPSPHP-FPMSSL
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


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.
502PHP-FPMfastcgi
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 article examines typical mistakes in Nginx‑PHP configurations—such as misplaced index directives, misuse of the if statement, and fastcgi parameter issues—and presents a cleaner, more reliable configuration using inheritance, try_files, and the appropriate fastcgi.conf file.
Best PracticesConfigurationPHP
0 likes · 6 min read


21CTOMar 24, 2016 · Backend Development
This article examines why many web projects pair a fast‑changing PHP front‑end with a stable, high‑performance Java back‑end, outlining each language’s strengths, recent improvements, integration methods, and architectural patterns such as view‑first and RPC/RESTful communication.
backend architecturefastcgimicroservices
0 likes · 14 min read

This article compares PHP and Node.js server‑side architectures, explaining CGI, FastCGI, Node.js child_process and cluster modules, PHP‑FPM limitations, and how ReactPHP brings event‑driven, asynchronous, non‑blocking I/O to PHP for higher web performance.
Backend PerformanceNode.jsPHP
0 likes · 14 min read

This article examines typical mistakes in Nginx‑PHP configurations—such as misplaced index directives, misuse of the if statement, and fastcgi parameter issues—and presents a cleaner, more secure configuration that leverages inheritance, try_files, and proper fastcgi settings.
BackendSecurityfastcgi
0 likes · 5 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.
BackendPHP-FPMfastcgi
0 likes · 6 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
