同样通过 vim 打开 php-fpm.conf 文件,在里面查找 memory_limit 关键字,很遗憾,发现并没有这个配置项。此时是不是有点失望呢?别气馁,仔细看看 php-fpm.conf 这个文件,就会发现如下配置:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
;;;;;;;;;;;;;;;;;;;; ; Pool Definitions ; ;;;;;;;;;;;;;;;;;;;;
; Multiple pools of child processes may be started with different listening ; ports and different management options. The name of the pool will be ; used in logs and stats. There isno limitation on the number of pools which ; FPM can handle. Your system will tell you anyway :)
; Include one or more files. If glob(3) exists, it is used to include a bunch of ; files from aglob(3) pattern. This directive can be used everywhere in the ; file. ; Relative path can also be used. They will be prefixed by: ; - the global prefix if it's been set (-p argument) ; - /usr/local/php otherwise include=/usr/local/php/etc/php-fpm.d/*.conf
; Default Value: nothing is defined by default except the values in php.ini and ; specified at startup with the -d argument ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com php_flag[display_errors] = off php_admin_value[error_log] = /usr/local/php/var/log/www-php-errors.log php_admin_flag[log_errors] = on php_admin_value[memory_limit] = 32M