Skip to main content

PHP-FPM keeps turning off on the main domains

Comments

7 comments

  • cPRex Jurassic Moderator

    Hey there!  I don't have a good explanation for this on my end.  Do you see anything in the Apache logs or PHP-FPM logs that might give more detail on this?  https://support.cpanel.net/hc/en-us/articles/360061253694-Where-are-the-global-PHP-FPM-logs-located

    0
  • Snowlion

    Nothing obvious. Very occasionally a WARNING saying:


    server reached max_children setting (10), consider raising it

    0
  • cPRex Jurassic Moderator

    Hmmmm, that's not very helpful, is it?

    What happens if you run our system status tool?  This may show a LOT of output, but just look for anything related to PHP or Apache:

    curl -s https://ssp.cpanel.net/run | sh
    0
  • Snowlion

    Perhaps these?

    [INFO] * PHP Default: [ EA4 ] [ 7.4.33 ( ea-php74 ) ] [ suphp ]
    [INFO] * cPanel PHP-FPM: running
    [WARN] * Custom templates (/var/cpanel/templates/apache2_4):  old.vhost.local old.ssl_vhost.local
    [WARN] * Apache Includes [/etc/apache2/conf.d/includes]: [pre_virtualhost_global.conf]
    [WARN] * Apache:  Loaded userdir_module - PHP scripts accessed by userdir will not be executed via PHP-FPM.
    [WARN] * Hooks in /var/cpanel/hooks/data:
         \_ /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cli.php --panel_cron
    0
  • cPanelPeter cPanel Staff

    Hello, 

    I'm assuming since you have these named with the word "old" in front of them, that they are no longer being used?  If that is the case, you should rename them so that the "old" is at the end (behind local).

    So something like: vhost.local.old and ssl_vhost.local.old
    Then rebuild httpd.conf (/scripts/rebuildhttpdconf) and restart (/scripts/restartsrv_httpd)

    If they are still used, then please diff their contents with the defaults. 

    Also please provide the output of: 

    cat /etc/apache2/conf.d/includes/pre_virtualhost_global.conf

     

    0
  • Snowlion

    Ok will do. Here is the output

    KeepAlive On
    MaxKeepAliveRequests 500
    KeepAliveTimeout 2
    Timeout 300

    <IfModule event.c>
        ServerLimit 16
        StartServers 8
        MinSpareThreads 25
        MaxSpareThreads 250
        ThreadsPerChild 25
        MaxRequestWorkers 250
        MaxConnectionsPerChild 5000
        GracefulShutdownTimeout 10
    </IfModule>

    <IfModule mod_fcgid.c>
        FcgidMaxRequestLen                      1073741824
        FcgidOutputBufferSize                   1073741824
        FcgidMinProcessesPerClass               0
        FcgidMaxRequestsPerProcess              500
        FcgidInitialEnv PHP_FCGI_MAX_REQUESTS   500
        FcgidInitialEnv PHP_FCGI_CHILDREN       0
        FcgidMaxProcesses                       100
        FcgidMaxProcessesPerClass               25
        FcgidFixPathinfo                        1
        FcgidIdleTimeout                        10
        FcgidBusyTimeout                        3600
        FcgidProcessLifeTime                    300
        FcgidIOTimeout                          300
        FcgidIdleScanInterval                   1
        FcgidErrorScanInterval                  1
        FcgidZombieScanInterval                 1
    </IfModule>
    0
  • cPanelPeter cPanel Staff

    Hello, 

    OK, do you know which MPM you're running with?  (event, prefork, fcgid) That will play a big part of which section in your output (if any) might be involved.

    What about the old files?  Did you rename them, rebuild and restart Apache?

    0

Please sign in to leave a comment.