SOLVED PHP FPM - impossible to validate new configuration

sebosiris

Registered
Jun 5, 2018
4
0
1
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
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.
 

sebosiris

Registered
Jun 5, 2018
4
0
1
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
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 :)
I'm glad to see the issue is now solved. Thank you for sharing the outcome.