Linux – Server reached pm.max_children setting

linuxnginxPHPphp-fpmWordpress

I am running a WordPress website under Nginx and FPM. In case of traffic it kills the php process and website stop working for all the user. Here is what i found from the log.

Is there any way that website do not stop working, but if there is more request than what we have configured will get busy single or in other way it will not work for those new users but for old user it works fine(Do not stop the whole website).

[20-Mar-2016 03:34:01] NOTICE: error log file re-opened
[21-Mar-2016 05:51:44] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 4 idle, and 27 total children
[23-Mar-2016 06:56:13] WARNING: [pool www] child 8707 exited on signal 11 (SIGSEGV) after 231123.827974 seconds from start
[23-Mar-2016 06:56:13] NOTICE: [pool www] child 14407 started
[23-Mar-2016 07:00:03] WARNING: [pool www] server reached pm.max_children setting (50), consider raising it
[23-Mar-2016 07:08:55] NOTICE: Terminating ...
[23-Mar-2016 07:08:55] NOTICE: exiting, bye-bye!

Best Answer

Depending on the amount of RAM you could use a lot more PHP children on your server.

If you are not sure where is the config file for FPM in you're distro you could run the following command: grep -R max_children /etc

This article explains pretty straightforward what you should do. http://myshell.co.uk/blog/2012/07/adjusting-child-processes-for-php-fpm-nginx/

Also, if enabling cache is an option, this extension would speed up the site ~10x.

Related Topic