PHP-FPM and memory_limit?
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
-
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 helps0 -
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 -
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 -
Thanks, its sorted after a restart of php-fpm :-D 0 -
Awesome :) 0
Please sign in to leave a comment.
Comments
7 comments