WARNING: [pool www] server reached max_children setting r=db9a9 (5), consider raising it

Keywords: WordPress - AWS - Technical issue - Other

bnsupport ID: 56ef3c7b-1275-9a85-8f48-fc8134f60a40

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues
? Php: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/administration/use-pagespeed/#disable-pagespeed
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/
https://docs.bitnami.com/general/apps/wordpress/configuration/configure-phpfpm-processes/

bndiagnostic failure reason: The documentation did not make any significant change

Description:
Get this when running the bitnami diagnostic tool. I have no idea what many child processes is the correct one. the link doesn’t give any recommendation.

Hello @dorishchitson,

This error usually indicates PHP script execution is slow due to busy server resources or buggy scripts. Please check the following guide to increase the number of PHP-FPM child processes:

https://docs.bitnami.com/general/apps/wordpress/configuration/configure-phpfpm-processes/

Also, it seems you received a high number of incoming requests originate from one or more unique IP addresses. This could indicate a bot attack. The following guide shows how to check for and block suspicious IP addresses.

https://docs.bitnami.com/aws/apps/moodle/troubleshooting/deny-connections-bots-apache/

Regards

Thanks - what would be the recommended of PHP-FPM child processes?

Yes i am aware of that i have put in a firewall rule.

Hello i updated the pm.max_children in /opt/bitnami/php/etc/common-dynamic.conf and restarted apache. Seems the max_children did not change. is the correct place to change the parameter? In /opt/bitnami/apps/APPNAME/conf/php-fpm/pool.conf pm=dynamic.

Please respond. thanks.

Hello @dorishchitson,

You can increase your php-fpm values, in your /opt/bitnami/php/etc/common-dynamic.conf file. Remember that you will need to restart PHP-FPM service later.

This guide may help (even though it is focused on nginx):
https://www.kinamo.be/en/support/faq/determining-the-correct-number-of-child-processes-for-php-fpm-on-nginx

Regards

Hi David thank you for responding, i changed common-dynamic.conf and then did:
sudo /opt/bitnami/ctlscript.sh restart apache

i am still getting this error:

[15-Jul-2021 06:12:16] WARNING: [pool www] server reached max_children setting (5), consid
er raising it

sorry i did restart php-fpm.

how can i check it worked? i haven’t received an error in a while.

Hello @dorishchitson,

Depending on the value you changed, you could execute the command below to the the php-fpm processes running:

ps aux | grep php-fpm

You could also verify the php-fpm status page:

  • Become root user
sudo su
  • Enable status page
echo "pm.status_path = /status" >> /opt/bitnami/php/etc/php-fpm.conf
sudo /opt/bitnami/ctlscript.sh restart php-fpm
  • Add apache logic in:
cat >> /opt/bitnami/apache2/conf/httpd.conf << EOF
# Enable 'status' and 'ping' page
<LocationMatch "/(ping|status)">
    SetHandler "proxy:unix:/opt/bitnami/php/var/run/www.sock|fcgi://localhost"
</LocationMatch>

# Enable *real-time* 'status' page
<IfModule alias_module>
    Alias /realtime-status "/opt/bitnami/php/php/php/fpm/status.html"
</IfModule>
EOF

sudo /opt/bitnami/ctlscript.sh restart apache
  • Check php-fpm status
curl localhost/status

Regards

Thank you, i will try that.

what exactly should i see when i do curl localhost/status? I tried what you suggested and then ran the curl command, am just getting the website page html
code instead.

You should see a summary of your php-fpm configuration. Please share a new support tool ID to verify your changes, along with the output of the curl command.

Regards

support ID tool: e450a828-d281-dcc4-fddf-2c51c7dd09b0

also please note it seems i am getting this max children setting error for [pool www] not php

i will email you directly the output of curl command. not on this public post thank you.

Hi @dorishchitson,

Please verify your /opt/bitnami/php/etc/php-fpm.conf contains this line (the support tool did not gather it):

"pm.status_path = /status"

It seems that your Apache configuration is applying a redirection that doesn’t let you see PHP-FPM status page. Could you try to comment out the line below in your /opt/bitnami/apache2/conf/httpd.conf temporarily and restart apache in order to check the status page?

Include "/opt/bitnami/apache2/conf/bitnami/bitnami.conf"

Undo the change once you verify it.

This is an expected output:

curl localhost/status
pool:                 www
process manager:      dynamic
start time:           20/Jul/2021:07:33:17 +0000
start since:          314
accepted conn:        2
listen queue:         0
max listen queue:     0
listen queue len:     0
idle processes:       3
active processes:     1
total processes:      4
max active processes: 1
max children reached: 0
slow requests:        0

Regards