Skip to main content

PHP-FPM and memory_limit?

Comments

7 comments

  • Jcats
    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:
    php_admin_value[memory_limit] = 128M
    then restart php-fpm
    # /scripts/restartsrv_apache_php_fpm
    Hope this helps
    0
  • frenziedfox
    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
    0
  • Jcats
    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.
    0
  • frenziedfox
    Thanks, its sorted after a restart of php-fpm :-D
    0
  • Jcats
    Awesome :)
    0
  • cPanelMichael
    edit: your /scripts/restartsrv_apache_php_fpm did the trick! Thanks :D

    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
    0
  • cPanelMichael
    Hello, To update, internal case CPANEL-11286 is included with cPanel version 62.0.16: Fixed case CPANEL-11286: Have PHP-FPM restart if PHP.ini values are updated from WHM. Additional information about product versions and the release process is available at:
    0

Please sign in to leave a comment.