Skip to content

PHP-FPM ping.path and ping.response config vars are ignored in status pool #14037

Closed
@Wilhansen

Description

@Wilhansen

Description

In the conf of PHP-FPM we have the following:

[www]
user = www-data
group = www-data
listen = /run/php/php8.2-fpm.sock
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.status_path = /status
pm.status_listen = 127.0.0.1:9000
ping.path = /ping
ping.response = pong

Despite following the comments and setting the values, when trying to connect to the service, we get a 404. Using the cgi-fcgi we can test using the command: SCRIPT_NAME=/ping SCRIPT_FILENAME=/ping REQUEST_METHOD=GET cgi-fcgi -bind -connect 127.0.0.1:9000

Resulted in this output:

Primary script unknownStatus: 404 Not Found
Content-type: text/html; charset=UTF-8

File not found.

But I expected this output instead:

X-Powered-By: PHP/8.2.7-dev
Content-type: text/plain;charset=UTF-8
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate, max-age=0

pong

PHP Version

PHP 8.2.7

Operating System

Debian 12

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions