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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

problem with php error log files

Discussion in 'EasyApache' started by dzamanakos, Feb 28, 2018.

Tags:
  1. dzamanakos

    dzamanakos Active Member

    Joined:
    Feb 15, 2014
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi, when using su_php i experienced a problem where php error log files didnt rotated after reaching 2MB (set in php.ini).

    I've recently moved to php-fpm for all accounts and php error files, now located in
    /home/user/logs/domain_ext.php.error.log
    are getting very large (size of GB, due to warnings logging) and do not get rotated.

    Is there a way to keep them at max X mb ?

    Best regards,
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,279
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Generally, you'd want to address the error messages that are filling up the log files. However, as an alternative, you could reduce the default log level of PHP-FPM to include less information. There's a guide on how to configure custom values for PHP-FPM at:

    PHP-FPM configuration settings

    In this case, you'd want to adjust the "log_level" parameter from its default "notice" value to "warning" or "error". The other option would be to setup custom logrotate rules for the specific PHP-FPM error logs you want to rotate.

    Thank you.
     
Loading...

Share This Page