Help troubleshooting Nginx + Php-Fpm Set up
Researched this issue many times and now need help understanding some diagnostics. Basically switched a server over from Apache + Php regular to Nginx + php-fpm . The problem is after a small increase in users Nginx starts encountering 503 and 502 errors. The main error we see in the log is “Connection reset by peer”. I ran iostat and top commands sorted by CPU usage and need help understanding if these are normal.
We stress tested with Apache Jmeter and as you can see in the top graphic many child processes get created with about 30 - 40 % cpu. I can’t imagine that being good. Also when running iostat the avg-cpu %user column jumps to the 90th percentile . I can’t imagine that being good either. The stress test we did was 100 users in 60 seconds which is the kind of activity this site gets.
I imagine this is a php script causing this problem , particularly wordpress. Does anyone have suggestions where to begin debugging this problem? So far we have tried increasing the buffer size, increasing the timeouts in php and nginx, but nothing has worked.
Image for iostat
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.