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!

Properly configure PHP7.2 with PHP-FPM On?

Discussion in 'EasyApache' started by Nurs1927, Oct 7, 2018.

  1. Nurs1927

    Nurs1927 Well-Known Member

    Joined:
    Nov 22, 2015
    Messages:
    63
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Hello, I used php 7.0 with DSO and PHP-FPM off
    Now I have php 7.2 with PHP-FPM On, but I have a lot of errors in apache error_log: related with mod_ruid2, proxy_fcgi, permissions,....

    In PHP Multiedior, I can select CGI or DSO for each domain.

    I have installed these apache modules
    Code:
    Loaded Modules:
     core_module (static)
     so_module (static)
     http_module (static)
     mpm_prefork_module (shared)
     cgi_module (shared)
     access_compat_module (shared)
     actions_module (shared)
     alias_module (shared)
     auth_basic_module (shared)
     authn_core_module (shared)
     authn_file_module (shared)
     authz_core_module (shared)
     authz_groupfile_module (shared)
     authz_host_module (shared)
     authz_user_module (shared)
     autoindex_module (shared)
     deflate_module (shared)
     dir_module (shared)
     expires_module (shared)
     filter_module (shared)
     headers_module (shared)
     include_module (shared)
     log_config_module (shared)
     logio_module (shared)
     mime_module (shared)
     negotiation_module (shared)
     proxy_module (shared)
     proxy_fcgi_module (shared)
     proxy_http_module (shared)
     proxy_wstunnel_module (shared)
     rewrite_module (shared)
     setenvif_module (shared)
     slotmem_shm_module (shared)
     socache_dbm_module (shared)
     socache_shmcb_module (shared)
     status_module (shared)
     unique_id_module (shared)
     unixd_module (shared)
     userdir_module (shared)
     bwlimited_module (shared)
     ssl_module (shared)
     security2_module (shared)
     ruid2_module (shared)
    
    And this PHP Extensions
    Code:
    [PHP Modules]
    Core
    ctype
    curl
    date
    dom
    exif
    filter
    ftp
    gd
    hash
    json
    libxml
    mbstring
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    readline
    redis
    Reflection
    session
    SimpleXML
    SPL
    sqlite3
    standard
    tokenizer
    wddx
    xml
    xmlreader
    xmlwriter
    xsl
    zip
    zlib
    
    [Zend Modules]
    My question is,
    How to properly configure PHP7.2 with PHP-FPM On, and without conflicts with php handlers?

    Many thanks.
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,072
    Likes Received:
    215
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @Nurs1927

    Can you show us the specific error you're receiving? That would be more helpful to resolve the issue in this instance.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Nurs1927 likes this.
  3. Nurs1927

    Nurs1927 Well-Known Member

    Joined:
    Nov 22, 2015
    Messages:
    63
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Hello @cPanelLauren

    I have errors related with proxy_fcgi:error. In 1 second I have hundreds of this errors:

    Code:
    .....
    [Tue Oct 09 19:57:54.513255 2018] [proxy_fcgi:error] [pid 19420] (70007)The timeout specified has expired: [client 213.27.203.187:18921] AH01075: Error dispatching request to : (polling), referer: https://www.mydomain.com/
    [Tue Oct 09 19:58:16.966583 2018] [proxy_fcgi:error] [pid 19667] (70007)The timeout specified has expired: [client 94.130.70.19:43112] AH01075: Error dispatching request to : (polling)
    [Tue Oct 09 20:00:01.532849 2018] [proxy_fcgi:error] [pid 19662] (70007)The timeout specified has expired: [client 94.130.70.19:43096] AH01075: Error dispatching request to : (polling)
    [Tue Oct 09 20:00:01.765599 2018] [proxy_fcgi:error] [pid 19663] (70007)The timeout specified has expired: [client 94.130.70.19:43104] AH01075: Error dispatching request to : (polling)
    [Tue Oct 09 20:00:08.503175 2018] [proxy_fcgi:error] [pid 19459] (70007)The timeout specified has expired: [client 213.27.203.187:21932] AH01075: Error dispatching request to : (polling), referer: https://www.mydomain.com/
    [Tue Oct 09 20:00:21.478012 2018] [proxy_fcgi:error] [pid 19412] (70007)The timeout specified has expired: [client 213.27.203.187:34242] AH01075: Error dispatching request to : (polling), referer: https://www.mydomain.com/
    [Tue Oct 09 20:00:21.543915 2018] [proxy_fcgi:error] [pid 19672] (70007)The timeout specified has expired: [client 94.130.70.19:43124] AH01075: Error dispatching request to : (polling)
    [Tue Oct 09 20:00:21.712133 2018] [proxy_fcgi:error] [pid 19661] (70007)The timeout specified has expired: [client 94.130.70.19:43094] AH01075: Error dispatching request to : (polling)
    .....
    My domains stop working and I have to restart the php-fpm apache service.

    After last restart I also have this errors:
    Code:
    [Tue Oct 09 20:22:04.891406 2018] [proxy_fcgi:error] [pid 19621] [client 217.23.7.126:55048] AH01079: failed to make connection to backend: httpd-UDS, referer: http://www.mydomain.com/
    [Tue Oct 09 20:22:04.892142 2018] [proxy:error] [pid 19543] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php72/root/usr/var/run/php-fpm/5a1759add1c29057a1bf74e5fad03e9a340b8b4e.sock (*) failed
    [Tue Oct 09 20:22:04.892153 2018] [proxy_fcgi:error] [pid 19543] [client 54.36.148.184:37574] AH01079: failed to make connection to backend: httpd-UDS
    [Tue Oct 09 20:22:04.892164 2018] [proxy:error] [pid 19623] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php72/root/usr/var/run/php-fpm/5a1759add1c29057a1bf74e5fad03e9a340b8b4e.sock (*) failed
    [Tue Oct 09 20:22:04.892173 2018] [proxy_fcgi:error] [pid 19623] [client 217.23.7.126:56210] AH01079: failed to make connection to backend: httpd-UDS, referer: http://viagranorx.com
    [Tue Oct 09 20:22:04.893060 2018] [proxy:error] [pid 18814] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php72/root/usr/var/run/php-fpm/5a1759add1c29057a1bf74e5fad03e9a340b8b4e.sock (*) failed
    [Tue Oct 09 20:22:04.893070 2018] [proxy_fcgi:error] [pid 18814] [client 54.36.148.232:19336] AH01079: failed to make connection to backend: httpd-UDS
    [Tue Oct 09 20:22:04.893716 2018] [proxy:error] [pid 19611] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php72/root/usr/var/run/php-fpm/5a1759add1c29057a1bf74e5fad03e9a340b8b4e.sock (*) failed
    [Tue Oct 09 20:22:04.893724 2018] [proxy_fcgi:error] [pid 19611] [client 217.23.7.126:59372] AH01079: failed to make connection to backend: httpd-UDS, referer: http://viagranorx.com
    My PHP-FPM Pool Options are:
    Max Children: 10
    Process Idle Timeout: 10
    Max Requests: 20

    In PrevirtualHost Include (Apache Configuration) I have:
    <IfModule proxy_fcgi_module>
    timeout 300
    ProxyTimeout 300
    </IfModule>
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,072
    Likes Received:
    215
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @Nurs1927

    Can you tell me what you have in the php-fpm error logs at:
    Code:
    /opt/cpanel/ea-php72/root/usr/var/log/error.log
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Nurs1927 likes this.
  5. Nurs1927

    Nurs1927 Well-Known Member

    Joined:
    Nov 22, 2015
    Messages:
    63
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Hi @cPanelLauren, thanks for your help.

    I think you mean
    Code:
    /opt/cpanel/ea-php72/root/usr/var/log/php-fpm/error.log
    The last 50 entries are:
    Code:
    [09-Oct-2018 21:47:51] NOTICE: [pool mydomain_com] child 15232 exited with code 0 after 52.841813 seconds from start
    [09-Oct-2018 21:47:51] NOTICE: [pool mydomain_com] child 15422 started
    [09-Oct-2018 21:48:01] NOTICE: [pool mydomain_com] child 15263 exited with code 0 after 57.249727 seconds from start
    [09-Oct-2018 21:48:01] NOTICE: [pool mydomain_com] child 15554 started
    [09-Oct-2018 21:48:01] NOTICE: [pool mydomain_com] child 15266 exited with code 0 after 57.121839 seconds from start
    [09-Oct-2018 21:48:01] NOTICE: [pool mydomain_com] child 15565 started
    [09-Oct-2018 21:48:28] NOTICE: [pool mydomain_com] child 15387 exited with code 0 after 49.501462 seconds from start
    [09-Oct-2018 21:48:28] NOTICE: [pool mydomain_com] child 15667 started
    [09-Oct-2018 21:48:41] NOTICE: [pool mydomain_com] child 15413 exited with code 0 after 52.779644 seconds from start
    [09-Oct-2018 21:48:41] NOTICE: [pool mydomain_com] child 15720 started
    [09-Oct-2018 21:48:42] NOTICE: [pool mydomain_com] child 15422 exited with code 0 after 50.667894 seconds from start
    [09-Oct-2018 21:48:42] NOTICE: [pool mydomain_com] child 15726 started
    [09-Oct-2018 21:48:42] NOTICE: [pool mydomain_com] child 15554 exited with code 0 after 41.337354 seconds from start
    [09-Oct-2018 21:48:42] NOTICE: [pool mydomain_com] child 15729 started
    [09-Oct-2018 21:48:43] NOTICE: [pool mydomain_com] child 15565 exited with code 0 after 41.819954 seconds from start
    [09-Oct-2018 21:48:43] NOTICE: [pool mydomain_com] child 15734 started
    [09-Oct-2018 21:48:53] NOTICE: [pool mydomain_com] child 15667 exited with code 0 after 24.411783 seconds from start
    [09-Oct-2018 21:48:53] NOTICE: [pool mydomain_com] child 15814 started
    [09-Oct-2018 21:49:08] NOTICE: [pool mydomain_com] child 15726 exited with code 0 after 25.978435 seconds from start
    [09-Oct-2018 21:49:08] NOTICE: [pool mydomain_com] child 15869 started
    [09-Oct-2018 21:49:08] NOTICE: [pool mydomain_com] child 15729 exited with code 0 after 26.216149 seconds from start
    [09-Oct-2018 21:49:08] NOTICE: [pool mydomain_com] child 15874 started
    [09-Oct-2018 21:49:09] NOTICE: [pool mydomain_com] child 15720 exited with code 0 after 28.659017 seconds from start
    [09-Oct-2018 21:49:09] NOTICE: [pool mydomain_com] child 15880 started
    [09-Oct-2018 21:49:12] NOTICE: [pool mydomain_com] child 15734 exited with code 0 after 29.515747 seconds from start
    [09-Oct-2018 21:49:12] NOTICE: [pool mydomain_com] child 15893 started
    [09-Oct-2018 21:49:45] NOTICE: [pool mydomain_com] child 15814 exited with code 0 after 52.029793 seconds from start
    [09-Oct-2018 21:49:45] NOTICE: [pool mydomain_com] child 16066 started
    [09-Oct-2018 21:49:57] NOTICE: [pool mydomain_com] child 15869 exited with code 0 after 49.290116 seconds from start
    [09-Oct-2018 21:49:57] NOTICE: [pool mydomain_com] child 16110 started
    [09-Oct-2018 21:50:00] NOTICE: [pool mydomain_com] child 15874 exited with code 0 after 51.639232 seconds from start
    [09-Oct-2018 21:50:00] NOTICE: [pool mydomain_com] child 16126 started
    [09-Oct-2018 21:50:02] NOTICE: [pool mydomain_com] child 15880 exited with code 0 after 52.643549 seconds from start
    [09-Oct-2018 21:50:02] NOTICE: [pool mydomain_com] child 16159 started
    [09-Oct-2018 21:50:05] NOTICE: [pool mydomain_com] child 15893 exited with code 0 after 52.448264 seconds from start
    [09-Oct-2018 21:50:05] NOTICE: [pool mydomain_com] child 16177 started
    [09-Oct-2018 21:50:35] NOTICE: [pool mydomain_com] child 16066 exited with code 0 after 50.375507 seconds from start
    [09-Oct-2018 21:50:35] NOTICE: [pool mydomain_com] child 16276 started
    [09-Oct-2018 21:50:57] NOTICE: [pool mydomain_com] child 16159 exited with code 0 after 55.093492 seconds from start
    [09-Oct-2018 21:50:57] NOTICE: [pool mydomain_com] child 16356 started
    [09-Oct-2018 21:51:00] NOTICE: [pool mydomain_com] child 16126 exited with code 0 after 60.156346 seconds from start
    [09-Oct-2018 21:51:00] NOTICE: [pool mydomain_com] child 16374 started
    [09-Oct-2018 21:51:02] NOTICE: [pool mydomain_com] child 16110 exited with code 0 after 64.678960 seconds from start
    [09-Oct-2018 21:51:02] NOTICE: [pool mydomain_com] child 16387 started
    [09-Oct-2018 21:51:02] NOTICE: [pool mydomain_com] child 16177 exited with code 0 after 57.544942 seconds from start
    [09-Oct-2018 21:51:02] NOTICE: [pool mydomain_com] child 16393 started
    [09-Oct-2018 21:51:08] NOTICE: [pool mydomain1_com] child 16115 exited with code 0 after 70.375765 seconds from start
    [09-Oct-2018 21:51:08] NOTICE: [pool mydomain1_com] child 16435 started
    [09-Oct-2018 21:51:14] NOTICE: [pool mydomain1_com] child 16113 exited with code 0 after 75.959119 seconds from start
    [09-Oct-2018 21:51:14] NOTICE: [pool mydomain1_com] child 16452 started
    If I search for warnings I have:
    Code:
    [07-Oct-2018 11:48:40] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [07-Oct-2018 23:36:51] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [08-Oct-2018 01:19:43] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [08-Oct-2018 09:00:27] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [08-Oct-2018 10:26:12] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [08-Oct-2018 14:59:39] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [08-Oct-2018 16:32:42] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [08-Oct-2018 21:02:54] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [08-Oct-2018 22:30:40] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [09-Oct-2018 02:25:55] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [09-Oct-2018 12:31:08] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [09-Oct-2018 15:05:49] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
    [09-Oct-2018 19:31:05] WARNING: [pool mydomain_com] server reached max_children setting (10), consider raising it
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,072
    Likes Received:
    215
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Nurs1927


    That's exactly what I meant, I apologize for the confusion and my typo! So that Warning you're getting indicates you're hitting your pool limits - this could and would cause the errors you're seeing. I would suggest modifying the max_children for that pool.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Nurs1927 likes this.
  7. Nurs1927

    Nurs1927 Well-Known Member

    Joined:
    Nov 22, 2015
    Messages:
    63
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    In MultiPHP > PHP-FPM pool options?
     
  8. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,072
    Likes Received:
    215
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Nurs1927

    Exactly, that's one of the values that should be modifiable through the UI.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Nurs1927 likes this.
  9. Nurs1927

    Nurs1927 Well-Known Member

    Joined:
    Nov 22, 2015
    Messages:
    63
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
  10. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,072
    Likes Received:
    215
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Nurs1927 likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice