Skip to content

Make /ping of php-fpm work again - #13980

Closed
Wilhansen wants to merge 2 commits into
php:PHP-8.2from
Wilhansen:php-fpm-ping.path-fix
Closed

Wilhansen wants to merge 2 commits into
php:PHP-8.2from
Wilhansen:php-fpm-ping.path-fix

Conversation

@Wilhansen

@Wilhansen Wilhansen commented Apr 16, 2024 •

Copy link
Copy Markdown
Contributor

The ping feature of php-fpm monitoring was previously not working (but the status is) due to the configuration variables ping.path and ping.response not being copied over to the worker when forked (but pm.status_path does). This results in the ping code path being disabled because the worker detects that ping.path is not configured.

@Wilhansen
Wilhansen requested a review from bukka as a code owner April 16, 2024 16:53
@devnexen

Copy link
Copy Markdown
Member

Your changes makes sense but seems to qualify as bug fix. Might be possible to target PHP-8.2 branch instead.

@bukka

bukka commented Apr 17, 2024 •

Copy link
Copy Markdown
Member

The problem with this is that the ping can be currently used for readiness and identifying if FPM is responsive. This change might change it. I need to think about this.

@Wilhansen

Wilhansen commented Apr 18, 2024 •

Copy link
Copy Markdown
Contributor Author

Your changes makes sense but seems to qualify as bug fix. Might be possible to target PHP-8.2 branch instead.

got it, will do so and rebase to php-8.2 branch.

(update: done, but i could not figure out how to add the bugfix label)

The ping feature of php-fpm monitoring was previously not working due to the configuration variables ping.path and ping.response not being copied over to the worker when forked. This results in the ping code path being disabled because the worker detects that ping.path is not configured.
@Wilhansen
Wilhansen force-pushed the php-fpm-ping.path-fix branch from 210b346 to 23190c9 Compare April 18, 2024 04:21
@Wilhansen

Wilhansen commented Apr 18, 2024 •

Copy link
Copy Markdown
Contributor Author

The problem with this is that the ping can be currently used for readiness and identifying if FPM is responsive. This change might change it. I need to think about this.

we were planning to use the ping feature for this, but it kept on returning a 404 despite /status working which is why i started looking into it
image

@Girgias
Girgias removed their request for review April 18, 2024 14:28
@bukka

bukka commented Apr 19, 2024

Copy link
Copy Markdown
Member

@Wilhansen Can you actually create an issue and describe the whole issue with all info including all config files. It's useful for linking the fix with that.

@bukka

bukka commented Apr 19, 2024

Copy link
Copy Markdown
Member

And mainly useful for me as a reminder to look into and see the exact problem that you have.

@Wilhansen

Copy link
Copy Markdown
Contributor Author

@Wilhansen Can you actually create an issue and describe the whole issue with all info including all config files. It's useful for linking the fix with that.

posted a bug report here: #14037

@adoy

adoy commented Jun 14, 2024 •

Copy link
Copy Markdown
Member

The patch looks good to me.

The problem with this is that the ping can be currently used for readiness and identifying if FPM is responsive. This change might change it. I need to think about this.

If the end user plans to use the /ping route for readiness checks, they should use the regular endpoint. This way, if all children are busy, FPM will not be considered ready to serve new requests, and the readiness check will fail appropriately. However, if the end user plans to use the /ping route for liveness checks, they should use the status_listen endpoint. This ensures that the process is not incorrectly killed for being unresponsive.

@bukka bukka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this and I can see the use case. It's something between feature and a bug (omission) as obviously status_listen was meant just for status but considering that adding the functionality cannot cause any breaking issue so I'm happy to accept it as a bug and merge it to 8.2

@bukka bukka closed this in 43bc53a Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants