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
You can take Nginx out of the picture, it just passes the request on, it's in php-fpm running your php code.
you might check your suhosin settings, suhosin.memory_limit.
when you see your phpinfo output there should be 2 columns, master and local for memory_limit, what do these each show?
128M is the default for memory_limit in php 5.3
Ok this is daft but I had memory_limit set to 2GB, which isn't understood. When I changed that to 2000M it worked!
For me it also ignored php.ini and I had to do the following:
vim /etc/php-fpm.d/www.conf
php_admin_value[memory_limit] = 10000M ;128M
Then restart php-fpm:
service php-fpm restart
In /etc/php5/fpm/php-fpm.conf
I have php_admin_value[memory_limit] = 512M
This works for me.
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.
The problem may be in fpm the process duplication, even you change your /etc/php5/fpm/php.ini it was not effect.