1

php-fpm crashing because of to many mysql processes

view story
linux-howto

http://serverfault.com – I have 2 frontend nginx servers going to 4 backend php-fpm servers which all run Wordpress. The php-fpm servers all connect to one MySQL server and I was checking some stats earlier each php-fpm server has 15 php-fpm processes which is fine, however the MySQL server has between 60 - 150 processes which are shown when I run show processlist; when the number reaches 160 processes on the MySQL server the php-fpm servers seem to crash and I get a nginx 504 error. Is this due to the php process hanging while it is waiting for the MySQL query to finish, but because MySQL has too many processes it (HowTos)