The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Monitor Service - PHP-FPM service for Apache

Discussion in 'EasyApache' started by Nirjonadda, Apr 15, 2017.

Tags:
  1. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    356
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    PHP-FPM service for Apache Down after Graceful Server Reboot.


    Code:
    Service Name     apache_php_fpm
    Service Status     failed ⛔
    Notification     The service “apache_php_fpm” appears to be down.
    Service Check Method     The system’s command to check or to restart this service failed.
    Number of Restart Attempts     6
    Service Check Raw Output     
    The subprocess “/usr/local/cpanel/scripts/restartsrv_apache_php_fpm” reported error number 9 when it ended.
    Startup Log     No startup log
    Memory Information     
    Used     5.75 GB
    Available     5.82 GB
    Installed     11.58 GB
    Load Information     0.50 0.67 1.02
    Uptime     35 minutes and 15 seconds
     
    #1 Nirjonadda, Apr 15, 2017
    Last edited: Apr 15, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,173
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It's possible the service check ran before the system could fully start the services after the reboot. Could you verify if the service resumed after waiting a few minutes after the reboot?

    Thank you.
     
  3. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    356
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    Please let me know that how to check ?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,173
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can browse to "WHM >> Service Status" to confirm that "apache_php_fpm" shows as "UP".

    Thank you.
     
  5. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    356
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    Yes Its is down stage.

    Screenshot_13.png
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,173
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know the output when attempting to restart the service? EX:

    Code:
    /scripts/restartsrv_apache_php_fpm
    Thank you.
     
  7. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    356
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    Code:
    [root@na ~]# /scripts/restartsrv_apache_php_fpm
    Service Status
    
    apache_php_fpm restarted successfully.
    [root@na ~]#
    Still are down from Service Status.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,173
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  9. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    356
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    Support Request ID is: 8387389
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,173
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    To update, it looks like this issue stemmed from a rogue configuration file located at:

    Code:
    /opt/cpanel/ea-php71/root/etc/php-fpm.d/www.conf
    Moving this file out of the way and restarting the Apache PHP-FPM service corrected the issue.

    Thank you.
     
  11. kudotcom

    kudotcom Registered

    Joined:
    Jun 16, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Near a keyboard
    cPanel Access Level:
    Root Administrator
    Do you mind saying what kind of setting it was? I'm having the same issue, the service is up though and wondering if it is some kind of issue from the example configruation.

    That's the only I got from log files:

    [16-Jun-2017 16:52:58.067518] DEBUG: pid 194089, fpm_got_signal(), line 85: received SIGTERM
    [16-Jun-2017 16:52:58.067545] NOTICE: pid 194089, fpm_got_signal(), line 86: Terminating ...
    [16-Jun-2017 16:52:58.067553] DEBUG: pid 194089, fpm_pctl(), line 231: switching to 'terminating' state
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,173
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It was the existence of the "www.conf" file itself, as that file is not utilized or populated through cPanel's PHP-FPM implementation. Configuration files in the "/opt/cpanel/ea-php$$/root/etc/php-fpm.d/" directories are named with the domain name (e.g. example.tld.conf). Here's an example of a default configuration file for a domain name:

    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; cPanel FPM Configuration ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    ; NOTICE This file is generated, please use our WHM User Interface
    ; to set these value.
    
    [example_com]
    catch_workers_output = yes
    chdir = /home/example
    group = example
    listen = /opt/cpanel/ea-php56/root/usr/var/run/php-fpm/ac93c83b7b5fb1234599d41e0e7e56f03150691.sock
    listen.group = nobody
    listen.mode = 0660
    listen.owner = example
    php_admin_flag[allow_url_fopen] = on
    php_admin_flag[log_errors] = on
    php_admin_value[disable_functions] = exec,passthru,shell_exec,system
    php_admin_value[doc_root] = "/home/example/public_html"
    php_admin_value[error_log] = /home/example/logs/example_com.php.error.log
    php_admin_value[short_open_tag] = on
    php_value[error_reporting] = E_ALL & ~E_NOTICE
    ping.path = /ping
    pm = ondemand
    pm.max_children = 5
    pm.max_requests = 20
    pm.max_spare_servers = 5
    pm.min_spare_servers = 1
    pm.process_idle_timeout = 10
    pm.start_servers = 0
    pm.status_path = /status
    security.limit_extensions = .phtml .php .php3 .php4 .php5 .php6 .php7
    user = example
    Thank you.
     
Loading...

Share This Page