warning
5.1.1.PHP-FPM max-children reached
PHP-FPM reached max children on {{ $labels.instance }} ({{ $value }} times in the last 5m)
- alert: PHP-FPMMax-childrenReached
expr: sum(increase(phpfpm_max_children_reached_total[5m])) by (instance) > 3
for: 0m
labels:
severity: warning
annotations:
summary: PHP-FPM max-children reached (instance {{ $labels.instance }})
description: "PHP-FPM reached max children on {{ $labels.instance }} ({{ $value }} times in the last 5m)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"warning
5.1.2.PHP-FPM listen queue saturation
PHP-FPM listen queue on {{ $labels.instance }} is at {{ $value | humanizePercentage }} of the socket backlog length, new connections may soon be queued or dropped.
- alert: PHP-FPMListenQueueSaturation
expr: sum(phpfpm_listen_queue_connections) by (instance) / sum(phpfpm_listen_queue_length_connections) by (instance) > 0.8
for: 5m
labels:
severity: warning
annotations:
summary: PHP-FPM listen queue saturation (instance {{ $labels.instance }})
description: "PHP-FPM listen queue on {{ $labels.instance }} is at {{ $value | humanizePercentage }} of the socket backlog length, new connections may soon be queued or dropped.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"warning
5.1.3.PHP-FPM busy process ratio high
{{ $value }}% of PHP-FPM processes are active (busy) on {{ $labels.instance }}, the pool is approaching its max_children capacity.
- alert: PHP-FPMBusyProcessRatioHigh
expr: (sum(phpfpm_processes_total{state="active"}) by (instance) * 100) / sum(phpfpm_processes_total) by (instance) > 80
for: 5m
labels:
severity: warning
annotations:
summary: PHP-FPM busy process ratio high (instance {{ $labels.instance }})
description: "{{ $value }}% of PHP-FPM processes are active (busy) on {{ $labels.instance }}, the pool is approaching its max_children capacity.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"warning
5.1.4.PHP-FPM slow requests ratio
{{ $value | humanizePercentage }} of accepted connections on {{ $labels.instance }} exceed request_slowlog_timeout, indicating degraded PHP-FPM response times.
# If this fires too often or too rarely, tune your PHP-FPM request_slowlog_timeout setting (which defines what counts as "slow") rather than this 10% ratio threshold.
- alert: PHP-FPMSlowRequestsRatio
expr: sum(rate(phpfpm_slow_requests_total[5m])) by (instance) / sum(rate(phpfpm_accepted_connections_total[5m])) by (instance) > 0.1 and sum(rate(phpfpm_accepted_connections_total[5m])) by (instance) > 0
for: 5m
labels:
severity: warning
annotations:
summary: PHP-FPM slow requests ratio (instance {{ $labels.instance }})
description: "{{ $value | humanizePercentage }} of accepted connections on {{ $labels.instance }} exceed request_slowlog_timeout, indicating degraded PHP-FPM response times.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"