• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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