PHP-FPM

DESK PHP-FPM monitoring provides information about connections, slow requests, and processes. If PHP-FPM is underperforming or a problem occurs, DESK lets you know immediately and shows you which hosts are affected.

Prerequisites

  • Linux or Windows
  • PHP version 5.5.9+
  • PHP-FPM Status page enabled on all nodes you want to monitor

Enabling PHP-FPM monitoring globally

With PHP-FPM monitoring enabled globally, DESK automatically collects PHP-FPM metrics whenever a new host running PHP-FPM is detected in your environment.

  1. In the navigation menu, select Settings.

  2. Select Monitoring > Monitored technologies.

  3. On the Supported technologies tab, find and expand the PHP-FPM row.

  4. Enter a Status page URI.

    To monitor more than one pool, type the URIs of the individual PHP-FPM status pages (separated by spaces) into the Status page URI field. All PHP-FPM instances must have a correct status page URI reference.

  5. Click Save.

  6. Set the PHP-FPM switch to the On position.

Enabling PHP-FPM monitoring for individual hosts

DESK provides the option of enabling PHP-FPM monitoring for specific hosts rather than globally.

  1. If global PHP-FPM monitoring is currently switched on, switch it off: go to Settings > Monitoring > Monitored technologies and set the PHP-FPM switch to the Off position.
  2. In the navigation menu, select Hosts.
  3. In the All hosts table, find and click the host you want to configure.
    The host page is displayed.
  4. In the host menu, select Edit to open Host settings.
  5. In the Monitored technologies table, find PHP-FPM and set the PHP-FPM switch to the On position.

Monitoring PHP-FPM

After you have enabled PHP-FPM monitoring, monitoring begins.

  1. In the navigation menu, select Technologies.

  2. Click the PHP tile on the Technology overview page.

  3. To view cluster metrics, find PHP-FPM in the Process group table under the tiles and click Details to display the PHP-FPM process group details.
    The chart displays the selected process group metric over time. You can select a different metric from the list.

  4. Click the Process group details button to display the process group page.

  5. Select the Technology-specific metrics tab to display metrics specific to PHP-FPM.

    • Select a different time interval from the time frame selector in the top menu bar to focus on a different time range.
    • Select a metric type from the metric drop list under the timeline to compare the values of all nodes in a sortable table view.
  6. To access node-specific metrics, select a node from the Process list at the bottom of the page.

  7. Click the PHP-FPM tab to display the number of Accepted connections (connections accepted by the pool) and the Slow requests count.

    Note: Accepted connections is sometimes misunderstood to represent the number of requests, but this metric measures exactly what its name suggests: the number of connections accepted by the pool.

Additional PHP-FPM node monitoring metrics

More PHP-FPM monitoring metrics are available on individual Process pages. Select the Further details tab to view these metrics. Here you’ll find additional PHP-FPM charts for Requests, Input buffering, and Processes.

When the number of total active processes reaches the Total processes limit, new scripts are prevented from running until the problematic processes have completed. The maximum number of Waiting connections defines the maximum number of connections that will be queued. Once this limit is reached, subsequent connections are refused or ignored.

Metrics

Metric Description
Accepted connections The number of connections accepted by the pool.
Slow requests The number of requests that have exceeded the request_slowlog_timeout value.
Waiting connections The number of requests in the queue of pending connections.
Max number of waiting connections The size of the pending connections socket queue.
Active processes The number of active processes.
Total processes The sum of idle + active processes.