• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • Our UX team believes in the in the power of direct feedback and would like to invite you to participate in interviews, tests, and surveys.
    To stay in the loop and never miss an opportunity to share your thoughts, please subscribe to our UX research program. If you were previously part of the Plesk UX research program, please re-subscribe to continue receiving our invitations.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved How can I activate PHP-FPM status page?

TuÄŸberkK

New Pleskian
Hello guys, some of my php-fpm proccesses are going crazy with cpu usage so I need the details of them. I figured to see that I need to reach the status page of PHP-FPM. But I couldn't manage that, I searched a lot.

PHP Settings --> Additional directives
Code:
pm.status_path=/status

Apache & nginx Settings --> Additional nginx directives
Code:
location ~ ^/status$ {
    allow 127.0.0.1;
    allow [yourip];
    deny all;
    fastcgi_split_path_info ^((?U).+\\.php)(/?.+)$;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_pass "unix:///var/www/vhosts/system/[yourdomainname]/php-fpm.sock";
    # I write my domain name here: [yourdomainname]
    include /etc/nginx/fastcgi.conf;
}

After applying these code and running /status on the web site I get "File not found." error.
 
Yes, that is the status page but when status page run with "status?full" parameter it shows in detail which scripts are being used.

For example: https://i.stack.imgur.com/WFw1l.png

I am trying to do this because some of my php-fpm proccess are consuming a lot of CPU, so I want to figure that out. If you know any other alternative ways to achieve this, I can do that too.

Thank you for your answer.
 
There used to be a support article in the Knowledge Base on the PHP FPM status page (how to use it in Plesk), but I cannot find it any longer. Maybe Plesk staff can?
 
I cannot find that article either, I think it is removed somehow. How can I ask this to Plesk staff?

I really need this solution or smt else, my server's cpu is at %100 constantly and I cant figure out why.
 
Question
How to enable pm.status_path and ping.path directives in order to monitor each instance of PHP-FPM by nginx (native, plesk-php56-fpm, plesk-php70-fpm and etc.)?

Answer
  1. Add required directives to [php-fpm-pool-settings] section in the /var/www/vhosts/system/example.com/conf/php.ini file.

    # cat /var/www/vhosts/system/example.com/conf/php.ini
    [php-fpm-pool-settings]
    pm.status_path = /status
    ping.path = /ping

    Note: if there is no such file, create a new one.

  2. Apply the changes:

    # /usr/local/psa/bin/php_settings -u

  3. Go to Domains > example.com > PHP Settings and set PHP to FPM application served by nginx

  4. Go to Domains > example.com > Apache & nginx Settings and add the following directives under Additional nginx directives section :

    location ~ ^/(status|ping)$ {
    fastcgi_split_path_info ^((?U).+\\.php)(/?.+)$;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_pass "unix:///var/www/vhosts/system/example.com/php-fpm.sock";
    include /etc/nginx/fastcgi.conf;
    }
Additional Information
Functionality to monitor PHP-FPM by apache is not implemented in Plesk at the moment.

How to change PHP-FPM pool settings for a domain in Plesk?
 
Back
Top