Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

php-fpm fails once a day

Discussion in 'General Discussion' started by digitaliway, Jul 21, 2017.

Tags:
  1. digitaliway

    digitaliway Member

    Joined:
    Feb 17, 2015
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    once a day at random times I get notified : The service “apache_php_fpm” appears to be down.
    it goes down then recovers in 4 minutes.

    I really have no idea where to start and need some help to get this stable, thanks to anyone in advance.

    fresh new server just migrated all clients from another cpanel server. server has 32cores 400gb ssd RAID 1 hardware - 96GB Ram - CLOUDLINUX 7.3 x86_64 standard –cPanel & WHM 64.0 (build 33) about 100 sites all running php-fpm with all default pool settings mostly php5.6 and a few php 7.

    more error report info below and this image: [removed]

    Memory Information
    Used 4.85 GB
    Available 89.36 GB
    Installed 94.21 GB
    Load Information 2.06 1.80 1.48

    Service Check Raw Output
    The subprocess “/usr/local/cpanel/scripts/restartsrv_apache_php_fpm” reported error number 9 when it ended.
     
    #1 digitaliway, Jul 21, 2017
    Last edited by a moderator: Jul 24, 2017
  2. Anoop P Alias

    Anoop P Alias Well-Known Member

    Joined:
    Mar 31, 2015
    Messages:
    76
    Likes Received:
    10
    Trophy Points:
    8
    Location:
    Kochi,Kerala,India
    cPanel Access Level:
    Root Administrator
    Does this affect any web site?. I think this is cPanel daemon's internal php using php-fpm and don't affect the php-fpm service used by the hosted domains .
     
  3. digitaliway

    digitaliway Member

    Joined:
    Feb 17, 2015
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    thanks for the reply. I am not sure how to determine if it is site or cpanel, would there be a specific log I could review? It is only down for 4 minutes or less according to the email report and I have yet to check sites in real time while down to see if they are non responsive since the window is so small and seems random.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know the output from /usr/local/apache/logs/error_log when this happens? Ensure to replace real domain names and IP addresses with examples, and post the output in CODE tags.

    Thank you.
     
  5. digitaliway

    digitaliway Member

    Joined:
    Feb 17, 2015
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    If you let me know how I can run a command to get the entire log as a downloaded file I can post privately or personal message.

    I grabbed a few entries that seem problematic.

    I am getting thousands of these entries
    Code:
    [Mon Jul 24 08:46:48.395089 2017] [proxy_fcgi:error] [pid 6920:tid 139924917442304] [client 0.0.0.0:50723] AH01071: Got error 'Primary script unknown\n'

    Code:
    [Mon Jul 24 08:47:05.680480 2017] [ssl:error] [pid 6920:tid 139924791551744] AH02032: Hostname 0.0.0.0 provided via SNI and hostname www.domain.com provided via HTTP have no compatible SSL setup

    Code:
    [Mon Jul 24 09:05:55.062773 2017] [mpm_worker:notice] [pid 3142:tid 139925245261952] AH00297: SIGUSR1 received.  Doing graceful restart
    [Mon Jul 24 09:05:55.319296 2017] [hostinglimits:notice] [pid 3142:tid 139925245261952] mod_hostinglimits: use Min UID 0
    [Mon Jul 24 09:05:55.319331 2017] [hostinglimits:notice] [pid 3142:tid 139925245261952] mod_hostinglimits: version 1.0-32. LVE mechanism enabled
    [Mon Jul 24 09:05:55.319340 2017] [hostinglimits:notice] [pid 3142:tid 139925245261952] mod_hostinglimits: found apr extention version 3
    [Mon Jul 24 09:05:55.319355 2017] [hostinglimits:notice] [pid 3142:tid 139925245261952] mod_hostinglimits: apr_lve_environment_init_group_minuid check ok
    [Mon Jul 24 09:05:55.374054 2017] [ssl:warn] [pid 3142:tid 139925245261952] AH01909: domain.com:443:0 server certificate does NOT include an ID which matches the server name
    [Mon Jul 24 09:05:55.375679 2017] [ssl:warn] [pid 3142:tid 139925245261952] AH01909: domain.com:443:0 server certificate does NOT include an ID which matches the server name
    [Mon Jul 24 09:05:55.408460 2017] [mpm_worker:notice] [pid 3142:tid 139925245261952] AH00292: Apache/2.4.25 (cPanel) OpenSSL/1.0.2k mod_bwlimited/1.4 configured -- resuming normal operations
    [Mon Jul 24 09:05:55.408505 2017] [core:notice] [pid 3142:tid 139925245261952] AH00094: Command line: '/usr/sbin/httpd'

    Code:
    [Mon Jul 24 09:16:44.073968 2017] [core:error] [pid 15769:tid 139924799944448] [client 0.0.0.0:37320] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Mon Jul 24 09:16:44.145855 2017] [core:error] [pid 16271:tid 139925022525184] [client 0.0.0.0:37322] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Mon Jul 24 09:16:44.217821 2017] [core:error] [pid 15717:tid 139924774766336] [client 0.0.0.0:37324] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    [Mon Jul 24 09:16:45.390174 2017] [core:error] [pid 15769:tid 139924883871488] [client 0.0.0.0:37332] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
     
  6. jonh

    jonh Well-Known Member

    Joined:
    Feb 15, 2016
    Messages:
    55
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    NY
    cPanel Access Level:
    Root Administrator
    Same thing started happening to me about two weeks ago. I get the fail email then few ins later the restart email for php fpm around same time.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Feel free to open a support ticket using the link in my signature so we can take a closer look at an affected system to see what's happening.

    Thank you.
     
  8. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    418
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator

    Yes, This same issue happened on my server.
     
  9. digitaliway

    digitaliway Member

    Joined:
    Feb 17, 2015
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    @cPanelMichael I submitted a ticket ID is: 8748347. please let me know when you are able to take a look at this. the crashes are increasing daily from only one to now two or three per day.
     
    #9 digitaliway, Jul 28, 2017
    Last edited by a moderator: Jul 31, 2017
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    To update, internal case CPANEL-13411 is open to address an issue where the service check for apache_php_fpm hangs when a domain reaches the max_children PHP-FPM limit. This leads to an error message like this during the service check:

    Code:
    apache_php_fpm [[check command:-][check command output:
    The subprocess “/usr/local/cpanel/scripts/restartsrv_apache_php_fpm” reported error number 9 when it ended.][socket connect:N/A][fail count:1]Restarting apache_php_fpm....
    [notify:failed service:apache_php_fpm]]...Done
    Service Check Finished
    I'll monitor this case and update this thread with more information as it becomes available.

    In the meantime, the temporary workaround is to search the PHP-FPM error logs (/opt/cpanel/ea-php$$/root/usr/var/log/php-fpm/error.log) for any domain name's reaching the max_children limit. The offending entries will look like this:

    Code:
    ERROR: unable to read what child say: Bad file descriptor (9)
    NOTICE: [pool domain_tld] child 1234 exited with code 0 after 25.12345 seconds from start
    Once you find which domain names are reaching the limit, you can increase the max_children value for them using the "Pool Options" feature in "WHM >> MultiPHP Manager".

    Thank you.
     
  11. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    418
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    @cPanelMichael Does this issue still are not fixed? I have set Max Children to 15 from 5, Does this enough valve for Max Children?
     
    #11 Nirjonadda, Aug 10, 2017
    Last edited: Aug 10, 2017
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    There's no update to report on CPANEL-13411 at this time. I'll continue to monitor the case and update this thread with new information as it becomes available. Increasing the "Max Children" limit for the offending domain name from "5" to "15" should act as a workaround, yes. However, you may want to monitor the PHP-FPM error log after making the change to verify the error messages no longer appear.

    Thank you.
     
    Nirjonadda likes this.
Loading...

Share This Page