5

I have modified pm.max_children in /opt/plesk/php/7.0/etc/php-fpm.d/domain.com.conf file.

I restarted the php70-fpm service and want to check whether my settings are enabled or not.

How can I check this setting?

2

If you just want to know how many workers are currently running, you can try with HTOP, do a htop and filter (F4) with "php-fpm".

Or with ps

ps aux | grep "php-fpm: pool"

If you want precise and technical informations, you can use the fpm status page:

Add this to you pool configuration:

pm.status_path = /status

Then this in your nginx configuration: (adapt to your configuration)

location ~ ^/(status|ping)$ {
     access_log off;
     allow 127.0.0.1;
     allow 10.10.10.10#your-ip;
     deny all;
     include fastcgi_params;
     fastcgi_pass 127.0.0.1:9000;
}

You can then use CURL to query with:

 curl http://localhost/status

Which gives you something like:

pool:                 www
process manager:      dynamic
start time:           01/Mar/2019:15:16:10 +0100
start since:          2551
accepted conn:        7843
listen queue:         0
max listen queue:     0
listen queue len:     0
idle processes:       8
active processes:     2
total processes:      10
max active processes: 10
max children reached: 0

More informations / Source: https://easyengine.io/tutorials/php/fpm-status-page

5
  • 1
    I can only see the currently running php-fpm processes but I can not see what the max value is. – Theo Feb 28 '19 at 14:13
  • 1
    I edited my answer with a more complete method. – iizno Mar 1 '19 at 15:47
  • so the max children value is the number of "max active processes"? – Theo Mar 1 '19 at 18:08
  • 1
    I think so, yes. Can someone confirm ? – iizno Mar 8 '19 at 13:01
  • 1
    according to comments in the default php-fpm .conf file: max active processes - the maximum number of active processes since FPM has started -- so this answer is incorrect – johnL Oct 7 '19 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.