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

added counting of connection state for sockets #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

frenkye
Copy link

@frenkye frenkye commented Jun 14, 2024

We had issue on one of our server, memcache was blocking some threads of FPM and they were stucked in "Finishing state"

This PR adding metriks like

# HELP php_fpm_state_count Count of PHP-FPM processes in each state.
# TYPE php_fpm_state_count gauge
php_fpm_state_count{socket_path="unix:///var/lib/php/8.1/fpm/test.cz.sock",state="Getting request information"} 3
php_fpm_state_count{socket_path="unix:///var/lib/php/8.1/fpm/test.cz.sock",state="Idle"} 28
php_fpm_state_count{socket_path="unix:///var/lib/php/8.1/fpm/test.cz.sock",state="Running"} 4

Based on info you get when calling

~$ REQUEST_METHOD="GET" SCRIPT_NAME="/fpm-status" SCRIPT_FILENAME="/fpm-status" QUERY_STRING="full" cgi-fcgi -bind -connect /var/lib/php/8.1/fpm/test.cz.sock

If something need to be modified, with a bit of guidance i can fix it.

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

Successfully merging this pull request may close these issues.

1 participant