Nginx or PHP FPM ignores memory_limit in php.ini

后端 未结 7 2239
被撕碎了的回忆
被撕碎了的回忆 2020-12-15 18:49

Server info: Ubuntu Server, Nginx, PHP FPM

in /etc/php5/fpm/php.ini I have: memory_limit = 512M in /etc/php5/fpm/php-fpm.conf

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 19:25

    Also encountered this now and wanted to increase memory of our server in a DigitalOcean droplet

    To summarize, here is what I did

    sudo nano /etc/php5/fpm/php-fpm.conf
    
    -- press Ctrl-W to do a search in nano text editor
    -- if php_admin_value[memory_limit] is there, change it
    php_admin_value[memory_limit] = 512M
    
    sudo service php5-fpm restart
    

    You don't need to restart nginx, just restarting php would be enough.

提交回复
热议问题