I have a web server apache 2.2 with fastcgi and php 5.3, I have memory limit set to 256MB in php.ini and with php-cgi -i I got 256MB. So the configurations is correct, my process read it without problem. I told this because I read many post in internet, and the problem was bad location of php.ini. In my case I'm sure is correct.
My processes php-cgi 8 plus parent allocate RSS for more of 256MB some process allocate also 700MB without problem. Why?
Which is the scope of memory limit when some processes php-cgi can allocate more of 256MB?
I tried to search for some bug, but I can't find nothing.
My application not use ini_set for override memory_limit parameter. So I'm sure the limit of 256MB should be honored.
Best Answer
The PHP
memory_limit
setting is a virtual memory limit. RSS is a measure of physical memory usage. They have very little to do with each other.The
memory_limit
setting sets the amount of virtual memory that a PHP script is permitted to directly allocate. It is not a process limit and it is not a physical memory limit.