Skip to main content

Properly configure PHP7.2 with PHP-FPM On?

Comments

14 comments

  • cPanelLauren
    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!
    0
  • Nurs1927
    Hello @cPanelLauren I have errors related with proxy_fcgi:error. In 1 second I have hundreds of this errors: ..... [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: [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: timeout 300 ProxyTimeout 300
    0
  • cPanelLauren
    HI @Nurs1927 Can you tell me what you have in the php-fpm error logs at: /opt/cpanel/ea-php72/root/usr/var/log/error.log
    0
  • Nurs1927
    Hi @cPanelLauren, thanks for your help. I think you mean /opt/cpanel/ea-php72/root/usr/var/log/php-fpm/error.log
    The last 50 entries are: [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: [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
    0
  • cPanelLauren
    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.
    0
  • Nurs1927
    Hi @Nurs1927 I would suggest modifying the max_children for that pool.

    In MultiPHP > PHP-FPM pool options?
    0
  • cPanelLauren
    Hi @Nurs1927 Exactly, that's one of the values that should be modifiable through the UI.
    0
  • Nurs1927
    Thanks @cPanelLauren, I'll test it and tell you.
    0
  • cPanelLauren
    Hi @Nurs1927 Perfect, sounds good!
    0
  • Nurs1927
    Hello @cPanelLauren, How do not log "NOTICE" in /opt/cpanel/ea-php72/root/usr/var/log/php-fpm/error.log Because I have this in Multi PHP Editor error_reporting = E_ALL & ~E_NOTICE
    But NOTICE appears in logs.
    0
  • kdean
    Go to /var/cpanel/ApachePHPFPM Create or edit "system_pool_defaults.yaml" and add (mine has others you may want as well): --- php_admin_value[error_reporting]: E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
    Then if I remember correctly execute: /scripts/php_fpm_config --rebuild
    and possibly: /scripts/rebuildhttpdconf
    Then restart Apache if not already done by previous scripts.
    0
  • cPanelLauren
    This will also go over how to change these values for php-fpm How to Manage Your php.ini Directives with PHP FPM | cPanel & WHM Documentation
    0
  • Nurs1927
    Hello anda thanks @kdean and @cPanelLauren for your support but doesn"t work for me: [08-Apr-2020 18:49:58] NOTICE: [pool mywebsite] child 10009 exited with code 0 after 7674.418452 seconds from start [08-Apr-2020 18:49:58] NOTICE: [pool mywebsite] child 30923 started
    Modify "system_pool_defaults.yaml" doesn"t work. Add "E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED" in WHM in MultiPHP editor doesn't work either: ; E_ALL (Show all errors, warnings and notices including coding standards.) ; E_ALL & ~E_NOTICE (Show all errors, except for notices) ; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) ; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED ; Development Value: E_ALL ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT ; http://php.net/error-reporting error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
    0
  • cPanelLauren
    @Nurs1927 This has to be set somewhere on the server, if the global settings doesn't change it you may want to look at local settings. That documentation goes over how to update/change the INI directives per user as well.
    0

Please sign in to leave a comment.