Hello,
I am currently running some load tests on a VPS.
I'm using Nginx (1.0.10) + PHP-FPM (PHP 5.3) + MySQL Community Server (5.5).
The VPS has four 8GB VCores, 24 GB RAM.
Though my tests, I've managed to safely run 500 PHP instances. Each PHP instance has a connection to MySQL, which tends to have problems with too much simultaneous threads, hence the 500 PHP children limit, to avoid numerous MySQL connection errors.
The problem is, when more than 500 clients are simultaneously connected to the server, since I exceed PHP-FPM max client number, I obviously get 502 BAD GATEWAY errors, because PHP FPM doesn't answer Nginx anymore.
I've tried to compile Nginx with EY-Balancer, which sadly, isn't updated for newer versions of Nginx (and I know too few C/C++ to make it compatible). It compiled fine, but when I tried restarting Nginx, the "max_connections" directive was unknown, as I half expected.
I don't know how I could limit my upstream requests to PHP-FPM at 500, the EY-Balancer upstream queue solution was quite elegant, but doesn't seem to work.
Did I do something wrong? Did anyone manage running EY-Balancer with Nginx 1.0.10 ?
Or, alternatively, does anyone know how I could limit/queue (Queuing would be way nicer to clients than just throwing them a 503 error) these upstream requests ?
Many, many thanks in advance for any answers you could provide.
Edit :
The description of the errors I get, that confirms my suspicions, is as follows in Nginx's error log
connect() to unix:/tmp/php-fpm.sock failed (11: resource temporarily unavailable) while connecting to upstream
Edited 1 time(s). Last edit at 01/09/2012 10:41AM by Neovote_G.