Discover Centmin Mod today
Register Now

PHP-FPM WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload Errors

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by negative, Jan 16, 2016.

  1. negative

    negative Member

    217
    22
    18
    Apr 11, 2015
    Ratings:
    +50
    Local Time:
    8:41 PM
    1.9.10
    10.1.11
    Hello everyone

    When i look the php-fpm logs on my server, i see just these lines

    Code:
    [root@server ~]# tail -f /var/log/php-fpm/www-error.log
    [15-Jan-2016 23:30:06] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [15-Jan-2016 23:30:06] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [15-Jan-2016 23:30:06] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [15-Jan-2016 23:30:06] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [15-Jan-2016 23:30:06] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [15-Jan-2016 23:30:06] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [15-Jan-2016 23:30:06] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [15-Jan-2016 23:30:06] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [15-Jan-2016 23:30:06] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    [15-Jan-2016 23:30:06] WARNING: failed processes threshold (10 in 60 sec) is reached, initiating reload
    Why occur these errors and how will be fixed ? I didn't find any solution in my research.

    Versions: php 7.0.2 - nginx 1.9.9

    Thanks
     
  2. Xon

    Xon Active Member

    134
    57
    28
    Nov 16, 2015
    Ratings:
    +177
    Local Time:
    2:41 AM
    1.13.x
    MariaDB 10.1.x
    Something is frequently crashing a php worker process, you might need to turn up php-fpm logging to get some more error messages.
     
    • Agree Agree x 1
  3. eva2000

    eva2000 Administrator Staff Member

    30,966
    6,919
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,422
    Local Time:
    4:41 AM
    Nginx 1.13.x
    MariaDB 5.5
    yup as @Xon stated

    Your /usr/local/etc/php-fpm.conf config file (see config file list) as 2 settings in it that control this to prevent further/permanent crashes (SIGSEGV or SIGBUS - segmentation faults and the such) see centminmod/php-fpm.conf at 123.08stable · centminmod/centminmod · GitHub
    Code:
    emergency_restart_threshold = 10
    emergency_restart_interval = 1m
    which is explained at PHP: Configuration - Manual and SEGSEGV and SIGBUS at c - Bus error vs Segmentation fault - Stack Overflow
    FAQ 19 lists your log files and there's one for PHP-FPM process /var/log/php-fpm/www-error.log and one for PHP apps /var/log/php-fpm/www-php.error.log

    Segfaults can usually happen due to either your web apps PHP code itself and/or it's interaction with your PHP extensions installed/loaded (i.e. Zend Opcache, Xcache or APC Cache are common ones when there's conflicts, bugs or compatibility issues with PHP extensions). Unfortunately, diagnosing and troubleshooting such is left up to you so you need to debug your php server. What are segfaults = Why Does The Segmentation Fault Occur on Linux / UNIX Systems?

    Examples with strace below:
    With gdb backtrace and PHP debug compiled mode where centmin.sh has a PHPDEBUGMODE variable which you can set to PHPDEBUGMODE=y and recompile php via centmin.sh menu option 5 to enable debug mode for PHP-FPM. After troubleshooting set PHPDEBUGMODE=n and recompile php via centmin.sh menu option 5 again to disable debug mode.
    Code:
    PHPDEBUGMODE=n # --enable-debug PHP compile flag
    Centmin Mod is provide as is, so short of scripted related bugs or issues, any further optimisation to the web stack components - nginx, php-fpm, mariadb mysql, csf firewall etc or web app specific configurations are left to the Centmin Mod user to deal with. So I do not provide any free support for such.

    You'll need to tune your PHP-FPM settings and this is left up to end user to do but here's a thread for starters to enable php status page output outlined at PHP-FPM - CentminMod.com LEMP Nginx web stack for CentOS and PHP-FPM - pm.max_children | Centmin Mod Community which outlines the official PHP-FPM config documentation as well.
     
    Last edited: Jan 16, 2016
    • Like Like x 1
  4. RoldanLT

    RoldanLT Well-Known Member

    3,979
    966
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,331
    Local Time:
    2:41 AM
    1.11
    10.2
    What extensions do you have installed by the way?
    memcache, memcached, imagick, geoip, mongodb, redis, ioncube?
     
    • Like Like x 1
  5. eva2000

    eva2000 Administrator Staff Member

    30,966
    6,919
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,422
    Local Time:
    4:41 AM
    Nginx 1.13.x
    MariaDB 5.5
  6. negative

    negative Member

    217
    22
    18
    Apr 11, 2015
    Ratings:
    +50
    Local Time:
    8:41 PM
    1.9.10
    10.1.11
    So i understanding that log_level parameter in fpmconf doesn't debug the problems. I must recompile the php version via centmin menu and then watch the php-fpm logs right ?

    I'm using now just zend opcache and redis but i see imagick, geoip, memcached loaded from /etc/centminmod/php.d/* So i can start with trying disable unused extension firstly like memcached :)

    And, Is these values best and ideal or do i need increase/decrease them ?
    emergency_restart_threshold = 10
    emergency_restart_interval = 1m
    Btw, for compatibility the extensions i think need upgrade them to latest versions. (Because php version already latest)
    So, How can i update these extension to latest version if it is not latest without recompile php ?
    I found that way; Firstly starting the php upgrade from menu #5 and it asks check updates before php upgrading and write "y" and enter then extensions are checking the latest versions and finally i write "n" for php upgrade process and exit. This process is upgrading all extensions to latest right ? Or do i need recompile php for do it ?
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,966
    6,919
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,422
    Local Time:
    4:41 AM
    Nginx 1.13.x
    MariaDB 5.5
    yes
    yes
    when you run centmin.sh menu option 5 for major version php changes i.e. 5.5 to 5.6 to 7.0 they will auto recompile latest php extensions defined by version numbers in centmin.sh or your persistent custom_config.inc. For same minor branch upgrades 5.6.16 to 5.6.17 the centmin.sh menu option 5 skips the recompile of php extensions as generally not needed. Some specific php extensions can be recompiled via centmin.sh menu options though like options 10, 12, 15, 19 when needed.

    FAQ item 37 gives info and commands for find the path to custom php extensions ini files for custom compiled PHP extensions
    Code:
    php --ini
    Configuration File (php.ini) Path: /usr/local/lib
    Loaded Configuration File:         /usr/local/lib/php.ini
    Scan for additional .ini files in: /etc/centminmod/php.d
    Additional .ini files parsed:      /etc/centminmod/php.d/a_customphp.ini,
    /etc/centminmod/php.d/curlcainfo.ini,
    /etc/centminmod/php.d/geoip.ini,
    /etc/centminmod/php.d/igbinary.ini,
    /etc/centminmod/php.d/imagick.ini,
    /etc/centminmod/php.d/mailparse.ini,
    /etc/centminmod/php.d/memcache.ini,
    /etc/centminmod/php.d/memcached.ini,
    /etc/centminmod/php.d/mongodb.ini,
    /etc/centminmod/php.d/redis.ini,
    /etc/centminmod/php.d/zendopcache.ini
    then just edit the ini file and comment out with semi-colon ; in front the zend_extension or extension load lines and restart php-fpm to disable manually the php extension i.e. for /etc/centminmod/php.d/zendopcache.ini

    Code:
    ;zend_extension=opcache.so
    for /etc/centminmod/php.d/memcached.ini
    Code:
    ;extension=/usr/local/lib/php/extensions/no-debug-non-zts-20151012/memcached.so
     
  8. RoldanLT

    RoldanLT Well-Known Member

    3,979
    966
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,331
    Local Time:
    2:41 AM
    1.11
    10.2
    I ask this because, I will recommend you to disable/remove extension you don't use at all.

    Like geoip module cause some crash on one of my server on PHP7 RC release.
     
    • Like Like x 1
  9. negative

    negative Member

    217
    22
    18
    Apr 11, 2015
    Ratings:
    +50
    Local Time:
    8:41 PM
    1.9.10
    10.1.11
    Ah okay i m using just redis and zend now so i can disable (delete the ini files) geoip, memcache, mongodb .

    And thank you for your tip @RoldanLT i will Disable the geoip too. Btw, Error watching is very hard in debug mod :)
     
  10. RoldanLT

    RoldanLT Well-Known Member

    3,979
    966
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,331
    Local Time:
    2:41 AM
    1.11
    10.2
    and also disable on custom_config.inc persistent config then re compile PHP.
     
    • Like Like x 1
  11. negative

    negative Member

    217
    22
    18
    Apr 11, 2015
    Ratings:
    +50
    Local Time:
    8:41 PM
    1.9.10
    10.1.11
    How can i define to exclude everything except zend opcache and redis in custom_config.inc ? What are the parameters exactly ?
     
  12. eva2000

    eva2000 Administrator Staff Member

    30,966
    6,919
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,422
    Local Time:
    4:41 AM
    Nginx 1.13.x
    MariaDB 5.5
    if you only need to temporarily disable some of the source compiled PHP extensions, just move their individual *.ini settings files out of php config scan directory at /etc/centminmod/php.d

    I added official FAQ item 38 outlining how to do this :)
     
    Last edited: Jan 18, 2016
  13. RoldanLT

    RoldanLT Well-Known Member

    3,979
    966
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,331
    Local Time:
    2:41 AM
    1.11
    10.2
     
    • Like Like x 1
    • Informative Informative x 1
  14. negative

    negative Member

    217
    22
    18
    Apr 11, 2015
    Ratings:
    +50
    Local Time:
    8:41 PM
    1.9.10
    10.1.11
    Thank you for your replies, i just move the ini files of the unwanted plugins to "disabled-plugins" folder then fpmrestart and it is done.

    But i don't know what do the mailparse and curlcainfo extensions ?
     
  15. eva2000

    eva2000 Administrator Staff Member

    30,966
    6,919
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,422
    Local Time:
    4:41 AM
    Nginx 1.13.x
    MariaDB 5.5
    mailparse.ini should of been move with the command outlined in FAQ item 38 if not move it manually and leave curlcainfo.ini alone as outlined in FAQ item 38
     
  16. negative

    negative Member

    217
    22
    18
    Apr 11, 2015
    Ratings:
    +50
    Local Time:
    8:41 PM
    1.9.10
    10.1.11
    I mean that; are they important for me ? I think i don't need them but i m not sure what do they ? :)
     
  17. eva2000

    eva2000 Administrator Staff Member

    30,966
    6,919
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,422
    Local Time:
    4:41 AM
    Nginx 1.13.x
    MariaDB 5.5
  18. negative

    negative Member

    217
    22
    18
    Apr 11, 2015
    Ratings:
    +50
    Local Time:
    8:41 PM
    1.9.10
    10.1.11
  19. eva2000

    eva2000 Administrator Staff Member

    30,966
    6,919
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,422
    Local Time:
    4:41 AM
    Nginx 1.13.x
    MariaDB 5.5
    yes
     
  20. negative

    negative Member

    217
    22
    18
    Apr 11, 2015
    Ratings:
    +50
    Local Time:
    8:41 PM
    1.9.10
    10.1.11
    Thank you for your help and replies, then it disabled too. Now i'm just running with zend opcache, redis and imagick and i will follow the warnings/errors in fpm logs.