Enable status for php-fpm

Accessing the PHP-FPM Status screen is easy enough. First, enable pm.status in your php pool:

pm.status_path = /status

Then add the following block to your Nginx vhost conf:

    location ~ ^/(status|ping)$ {
        access_log off;
        allow 127.0.0.1;
        allow 192.168.1.0/24; ##### YOU WILL WANT TO CHANGE THIS TO YOUR IP ADDR #####
        deny all;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/var/run/php-fpm-www.sock;
    }

Restart php-fpm and nginx and then browse to http:///status. You will be presented with some useful information on the current status of your PHP-FPM pool.

By default /status will just show a short status, like an overview of all of the processes. To see output on each process append ?full to the url, http:///status?full. You can also pass ?json to get JSON output, if you wanted to feed the data into some other log or stats processing tool (thinking like, greylog or logstash?).

Here is a breakdown of the stats presented to you:

pool - the name of the pool.
process manager - static, dynamic or ondemand.
start time - the date and time FPM has started.
start since - number of seconds since FPM has started.
accepted conn - the number of request accepted by the pool.
listen queue - the number of request in the queue of pending connections (see backlog in listen(2)).
max listen queue - the maximum number of requests in the queue of pending connections since FPM has started.
listen queue len - the size of the socket queue of pending connections.
idle processes - the number of idle processes.
active processes - the number of active processes.
total processes - the number of idle + active processes.
max active processes - the maximum number of active processes since FPM has started.
max children reached - number of times the process limit has been reached.

Use this information to tune your pool configuration.