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!

SOLVED PHP FPM - impossible to validate new configuration

Discussion in 'EasyApache' started by sebosiris, Jun 5, 2018.

Tags:
  1. sebosiris

    sebosiris Registered

    Joined:
    Jun 5, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    london
    cPanel Access Level:
    Root Administrator
    Hello,

    I am trying to change the level of logging from notice to warning as well as the location of the logs in my /var/cpanel/userdata/user/domain.php-fpm.yaml config file. I am also trying to enable slowlog but changes are not being processed by the server. This is how my domain php-fpm config file looks right now:

    Code:
    ---
    _is_present: 1
    log_level = warning
    error_log = /var/log/php-pfm/fpm_error.log
    slowlog = /var/log/php-pfm/slow.log
    request_slowlog_timeout = 10s
    
    I then ran : Run /scripts/php_fpm_config --rebuild --domain="domain"
    (where "domain" is the domain name) with the following console output:
    Code:
    info [php_fpm_config] rebuild_files: working on domain (domain.com)
    info [php_fpm_config] php-fpm: rebuild_files: restart fpm services for Apache
    info [php_fpm_config] php-fpm: fpm services restarted
    info [php_fpm_config] Rebuilding apache conf
    I also restarted PHP-FPM from WHM restart services after that but the changes are not taking place.

    I think the problem may be coming from the php-fpm cache config files. Under /var/cpanel/userdata/user/ I have a file domain.php-fpm.cache alongside domain.php-fpm.yaml. But the cache file only ahows :
    Code:
    {"_is_present":1}
    So I tried to run /scripts/updateuserdatacache and /scripts/updateuserdatacache --force to regenerate the correct cache file but there was no output and the cache file was not regenerated.
    Even after removing the old cache file, no new cache file was regenerated.

    I then restarted the Apache server with no luck.

    I have followed instructions from this page: Configurations Values of PHP-FPM - Version 68 Documentation - cPanel Documentation and also from the different posts ont this subject in the forum.

    I also tried to make these changes in the global configuration for PHP-FPM by creating the following file /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml and adding the lines above and then run /scripts/php_fpm_config --rebuild but nothing changes.

    At this point, I am not sure what to do :-(

    Many thanks
    sebastien
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,423
    Likes Received:
    1,957
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @sebosiris,

    I'm happy to try reproducing this on a test system for you. Can you verify the specific steps you are taking after making the PHP-FPM configuration changes to test those new values?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sebosiris

    sebosiris Registered

    Joined:
    Jun 5, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    london
    cPanel Access Level:
    Root Administrator
    Hello,

    Thank you. The first thing I do is check the log location and the level of logging.

    Based on the default configuration, logs are located at /opt/cpanel/ea-php71/root/usr/var/log/php-fpm/error.log. After rebuilding the /scripts/php_fpm_config --rebuild and restarting PHP-FPM, the log location should be in /var/log/php-pfm/fpm_error.log with a level of logging set to WARNING but everything is still the same. Logs are still being updated (tail -f) at a NOTICE level. Even if I create the log fie manually, logs are still being written to the old location with NOTICE level.

    And my cache config file (domain.php-fpm.cache) still shows only the basic config so I think it is the problem of regenerating the cache:
    Code:
    {"_is_present":1}
    Many thanks
    sebastien
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,423
    Likes Received:
    1,957
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @sebosiris,

    Can you open a support ticket so we can take a closer look at the PHP-FPM configuration on your system. You can post the ticket number here and we will update this thread with the outcome.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. sebosiris

    sebosiris Registered

    Joined:
    Jun 5, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    london
    cPanel Access Level:
    Root Administrator
    Hello, I have created a ticket as requested: Support Request ID is: 9698559

    Many thanks
    sebastien
     
  6. sebosiris

    sebosiris Registered

    Joined:
    Jun 5, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    london
    cPanel Access Level:
    Root Administrator
    I will close this post and the ticket associated. I used the wrong syntax without realising. I should have used "colon" instead of "equal". All good now :)
     
  7. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,423
    Likes Received:
    1,957
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm glad to see the issue is now solved. Thank you for sharing the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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