Nginx or PHP FPM ignores memory_limit in php.ini

The problem may be in fpm the process duplication, even you change your /etc/php5/fpm/php.ini it was not effect.

  • Stop php5-fpm with (ubuntu): sudo service php5-fpm stop
  • check that no more fpm processes: sudo ps ax | grep fpm
  • if any kill it all with: sudo kill -9 pid
  • be sure that you kill all fpm processes
  • restart: sudo service php5-fpm restart

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


In /etc/php5/fpm/php-fpm.conf I have php_admin_value[memory_limit] = 512M

This works for me.

Tags:

Nginx

Php