Tuesday, July 10, 2018

Can “active processes” be larger than “max_children” for PHP-FPM

Leave a Comment

Having set the pool to static with max_children to 5 I would expect the metric "active processes" to be 5 or below. Sending 10 concurrent requests will have "active processes" report more than 5 (e.g. 10, 12, 25, ...).

Is this valid behaviour?

Pool configuration:

# grep -v ";" /usr/local/etc/php-fpm.d/www.conf | grep -Ev "^$" [www] user = www-data group = www-data listen = 127.0.0.1:9000 pm = static pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 pm.process_idle_timeout = 10s pm.max_requests = 500 pm.status_path = /status ping.response = pong slowlog = log/$pool.log.slow request_slowlog_timeout = 0 request_terminate_timeout = 0 

Expected result: Metric "active processes" from /status should be below 5.

Actual result: Metric "active processes" from /status is above 5.

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment