Terraform state file and state lock table are hosted in AWS, while servers are hosted in Hetzner Cloud.
Server list:
- bastion
- nextcloud
- web (planned)
- The problem
WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
- Solution
sed -i 's/pm = dynamic/pm = static/' /etc/php/8.1/fpm/pool.d/www.conf
sed -i 's/pm.max_children = 5/pm.max_children = 50/' /etc/php/8.1/fpm/pool.d/www.conf
Source: server reached pm.max_children setting (5)
- Validation: sum php-fpm memory used (in MB):
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 | grep www | awk '{sum+=$1;} END{print sum;}'