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.

SOLVED PHP-FPM and memory_limit?

Discussion in 'EasyApache' started by frenziedfox, Feb 20, 2017.

Tags:
  1. frenziedfox

    frenziedfox Member

    Joined:
    Mar 9, 2010
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    51
    Hi,

    I am trying to up memory_limit to 128M (currently 32M). Where is that done? I have done the enabling exec,system to disable_functions (Enabling PHP-FPM forces disable_functions) but there is no mention of memory_limit?

    Is it done in the same file (/var/cpanel/ApachePHPFPM/system_pool_defaults.yaml)? What is the format?

    thanks,

    Alex
     
    #1 frenziedfox, Feb 20, 2017
    Last edited: Feb 20, 2017
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Alex,

    You don't have to set it in php-fpm, you can do this in WHM > MultiPHP INI Editor or cPanel > MultiPHP INI Editor, depending on if you want the limitation to be set globally(WHM) or for a specific account(cPanel).

    If you do prefer to set it using php-fpm, you can do so by modifying the domains pool:

    /opt/cpanel/ea-php$VER/root/etc/php-fpm.d/domain.com.conf

    Change $VER to the PHP version for that domain running PHP-FPM, example for PHP 7.0 it would be:

    /opt/cpanel/ea-php70/root/etc/php-fpm.d/domain.com.conf

    you can add the following flag:

    Code:
    php_admin_value[memory_limit] = 128M
    
    then restart php-fpm

    Code:
    # /scripts/restartsrv_apache_php_fpm
    Hope this helps
     
  3. frenziedfox

    frenziedfox Member

    Joined:
    Mar 9, 2010
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    51
    Hi Jcats,

    Thanks but in my Cpanel (per domain) its already set and ditto under WHM (for all domains) but I thought PHP-FPM needs it setting elsewhere like disable_functions?

    Alex

    edit: your /scripts/restartsrv_apache_php_fpm did the trick! Thanks :D
     
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Nope, it doesn't need its own settings, you can do either or, the options you use in the PHP-FPM conf will take precedence over whats set in php.ini is all.
     
  5. frenziedfox

    frenziedfox Member

    Joined:
    Mar 9, 2010
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    51
    Thanks, its sorted after a restart of php-fpm :-D
     
  6. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Awesome :)
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm happy to see the issue is now resolved. Note that internal case CPANEL-11286 will ensure PHP-FPM is restarted when PHP.ini modifications are made through the UI in cPanel version 62. You can monitor the cPanel 62 Change Log for this case to see when it's included. Additionally, the associated case number for this change in cPanel version 64 is CPANEL-10330.

    Thank you.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...
Similar Threads - memory_limit
  1. ascalotoru
    Replies:
    3
    Views:
    288

Share This Page