nginx + php-fpm: how to specify memory limit for an application
Solution 1:
You've got a couple of options. You can either:
-
Set the
fastcgi_param
ofPHP_VALUE
to be the relevant setting in the nginx configuration:fastcgi_param PHP_VALUE "memory_limit = 128M";
-
Set it via the
php_value
setting in the FPM pool configuration file. Something likephp_value[memory_limit] = 128M
. Usephp_admin_value
if you don't want the setting to be overridable viaini_set
.