How to optimize and secure nginx and php-fpm

I had a inquiry from a customer about a web servers that was producing random 502 errors. This is the type of error you typically see from php-fpm when something upstream has not worked properly (which most of us think of downstream but that’s a different story). Thankfully php-fpm was logging so that helped me see that the server was hitting the MaxClient frequently.

Show performance metrics

php-fpm config

brian4286

Brian has spent more than fifteen years as Unix enthusiast, specalising in systems administration and solutions architecture for SMB's to Fortune 100 companies. His career has focused on emerging and niche technologies to major advancements in the industry - most notibly cloud.