To check for logs:
cd /opt/bitnami/php/var/log
sudo nano php-fpm.log
To change configuration
sudo nano /opt/bitnami/php/etc/bitnami/common.conf
change
pm.max_children = 8; //changed from 5 to 8
pm.start_servers=half of pm.max_spare_servers
pm=ondemand //created new line
pm.max_children=300
pm.start_servers=20
pm.min_spare_servers=5
pm.max_spare_servers=40
pm.max_requests=500 //changed from 5000 to 500
sudo /opt/bitnami/ctlscript.sh restart apache
sudo /opt/bitnami/ctlscript.sh restart php-fpm
To check how many mb used at a time:
ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' | grep php-fpm
Reference:
https://stackoverflow.com/questions/25097179/warning-pool-www-seems-busy-you-may-need-to-increase-pm-start-servers-or-pm
https://serverfault.com/questions/863238/check-an-average-memory-usage-by-single-php-fpm-process
https://vincentteyssier.medium.com/optimizing-magento2-php-fpm-configuration-parameters-e1da16173e1c
https://docs.bitnami.com/aws/apps/magento/configuration/configure-phpfpm-processes/