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
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.