php-fpm_investigation
This is an old revision of the document!
List the max children configuration for all php-fpm pools:
1 |
grep - v '^;\|^$' /etc/php-fpm .d/*.conf | awk '/pm.max_children/' |
1 |
awk '!/^;|^$/ && /pm.max_children/' /etc/php-fpm .d/*.conf |
1 2 3 4 5 6 7 |
/etc/php-fpm .d /site1 .conf:pm.max_children = 300 /etc/php-fpm .d /site2 .conf:pm.max_children = 10 /etc/php-fpm .d /site3 .conf:pm.max_children = 300 /etc/php-fpm .d /site4 .conf:pm.max_children = 14 /etc/php-fpm .d /site5 .conf:pm.max_children = 14 /etc/php-fpm .d /site6 .conf:pm.max_children = 14 /etc/php-fpm .d /www .conf:pm.max_children = 50 |
Check the amount of processes running for each php-fpm pool:
1 |
ps aux -- sort :-rss | awk '/php-fpm/ {print $1, $8, $11, $13}' | sort | uniq -c | sort -rn |
1 2 3 4 5 6 |
137 502 S php-fpm: site2.com 95 502 S php-fpm: site1.co.uk 10 502 S php-fpm: site4.com 8 502 S php-fpm: site6.co.uk 7 502 S php-fpm: site3.co.uk 5 apache S php-fpm: www |
php-fpm_investigation.1463426239.txt.gz · Last modified: 2024/05/23 07:26 (external edit)