Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Wilhansen opened this issue Apr 23, 2024 · 2 comments
Open

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

Wilhansen opened this issue Apr 23, 2024 · 2 comments

Comments

@Wilhansen
Copy link

Wilhansen commented Apr 23, 2024

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

@bukka
Copy link
Member

bukka commented Apr 28, 2024

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

@Wilhansen
Copy link
Author

@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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants