Welcome to Centmin Mod Community
Register Now

PHP-FPM [pool www] child exited with code 1 - how do I enable debug?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Jens Sogaard, Jun 8, 2016.

  1. Jens Sogaard

    Jens Sogaard New Member

    12
    8
    3
    Feb 28, 2016
    Copenhagen, Denmark
    Ratings:
    +9
    Local Time:
    11:52 PM
    1.9.4
    PHP 5.6.22 (fpm-fcgi) (built: Jun 7 2016 20:03:18)
    nginx version: nginx/1.11.1


    I see quite a few of these every day. I found it while searching for problems related to some users randomly getting err_connection_time_out in Chrome. The server is hosted at linode 6 core / 8GB ram. How do I enable debugging so that I can trace the errors?

    Also can any of you explain what code 1 means?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,882
    6,907
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,400
    Local Time:
    8:52 AM
    Nginx 1.13.x
    MariaDB 5.5
    What's output for these commands - post output wrapped in CODE tags
    Code (Text):
    php -v

    Code (Text):
    php -m

    Code (Text):
    php-config --configure-options


    PHP maybe segfaulting and hitting it's limits with your specific php web application 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.
     
  3. Jens Sogaard

    Jens Sogaard New Member

    12
    8
    3
    Feb 28, 2016
    Copenhagen, Denmark
    Ratings:
    +9
    Local Time:
    11:52 PM
    1.9.4
    Thank you. The output of the three commands is listed below. I'll look into GDB tonight

    Code:
    PHP 5.6.22 (cli) (built: Jun  7 2016 20:03:17)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    Code:
    PHP 5.6.22 (cli) (built: Jun  7 2016 20:03:17)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    You have new mail in /var/spool/mail/root
    [root@durban ~]# php -m
    [PHP Modules]
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    enchant
    ereg
    exif
    filter
    ftp
    gd
    geoip
    gettext
    gmp
    hash
    iconv
    igbinary
    imagick
    imap
    intl
    json
    libxml
    mbstring
    mcrypt
    memcache
    memcached
    mhash
    mongo
    mysql
    mysqli
    mysqlnd
    newrelic
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    pspell
    readline
    redis
    Reflection
    session
    shmop
    SimpleXML
    snmp
    soap
    sockets
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
    Code:
    --enable-fpm --enable-opcache --enable-intl --enable-pcntl --with-mcrypt --with-snmp --with-mhash --with-zlib --with-gettext --enable-exif --enable-zip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=lib64 --with-mysqli=mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock --with-curl --with-gd --with-xmlrpc --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --with-vpx-dir=/usr --with-t1lib=/usr --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd --enable-inline-optimization --with-imap --with-imap-ssl --with-kerberos --with-readline --with-libedit --with-gmp --with-pspell --with-tidy --with-enchant --with-fpm-user=nginx --with-fpm-group=nginx --disable-fileinfo --with-config-file-scan-dir=/etc/centminmod/php.d --with-xsl CC=ccache CXX=ccache