Wednesday, May 14, 2014

PHP5-fpm error log

Hey,


This is the error I am getting


[13-May-2014 09:50:53] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[13-May-2014 09:51:01] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[13-May-2014 09:51:43] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it
[13-May-2014 09:57:37] WARNING: [pool www] server reached pm.max_children setting (10), consider raising it

I am using ubuntu12.04 and nginx with php5-fpm. When load get increased in my server i am getting the following error in /var/log/php5-fpm.log

Solution:

grep -r -l "pm.max_children" /etc/*
Copy the file /etc/php5/fpm/pool.d/www.conf to a safe location
Edit the following values
pm = dynamic
pm.max_children = 100
pm.start_servers = 25
pm.min_spare_servers = 10
pm.max_spare_servers = 40
pm.max_requests = 1000


/etc/init.d/php5-fpm restart
 /etc/init.d/nginx restart

This helps