How to Troubleshoot a 502 Bad Gateway on Nginx

A 502 Bad Gateway error means Nginx is running, but the app behind it is not answering. The browser shows the error page, your visitors see a dead site, and Nginx itself is fine, which is why this error confuses people: the server that serves the error is healthy, while the thing it proxies to … Read more

Read Full Guide →

PHP-FPM Tuning for High-Traffic Sites: pm Settings Explained

PM settings explained: this guide shows how PHP-FPM decides how many workers handle requests, and how to tune those settings for high-traffic sites. When a traffic spike hits, PHP-FPM decides how many PHP workers handle requests, how quickly new workers start, and when idle workers go away. Get those settings wrong and the site either … Read more

Read Full Guide →

How to Tune Nginx for 10,000 Concurrent Connections

When a traffic spike hits, Nginx rarely falls over because it is slow. It falls over because a limit somewhere runs out: file descriptors, worker connections, or memory for idle keepalive sessions. Tuning nginx concurrent connections means finding those limits before your users do, then raising them in the right order. This guide walks through … Read more

Read Full Guide →