Skip to content

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

Closed

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

Activity

  1. bukka commented on Apr 28, 2024

    @bukka
    Member

    @Wilhansen Can you please provide the full FPM config. I assume that you use pm.status_listen as well.

  2. Wilhansen commented on Apr 28, 2024

    @Wilhansen
    ContributorAuthor

    @Wilhansen Can you please provide the full FPM config. I assume that you use pm.status_listen as well.

    updated issue to add the full conf (without the comments)

  3. Francesco-n-dev commented on May 7, 2024

    @Francesco-n-dev

    Hello!
    Giving my 2 cents here!
    It might be useful for this issue to know that i encountered the same problem using PHP version 8.3.6

  4. changed the title [-]PHP-FPM `ping.path` and `ping.response` config vars are ignored.[/-] [+]PHP-FPM `ping.path` and `ping.response` config vars are ignored in status pool[/+] on Jun 16, 2024
  5. added a commit that references this issue on Jun 16, 2024
    43bc53a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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