Is My PHP Script Running Out Of Memory?

I’ve got a PHP script that sometimes just dies with no errors to the browser and no messages in the error log. I’ve seen this in the past with scripts that consumed too much memory (yeah, it should have issued an error, but it didn’t, and increasing the memory limit fixed it), but now the memory limit is set pretty high and I’m not sure I want to increase it further. I certainly don’t want to increase it without seeing where it’s going wrong, anyway.

To do that, IBM developerWorks says the memory_get_usage() and memory_get_peak_usage() functions are for me. And they offer some other interesting tips as well.

No Comments

No comments yet.

Comments RSS TrackBack Identifier URI

Leave a comment

 

User contributed tags for this post:

php script memory (15) - php running out of memory (10) - memory (7) - seexy.com (6) - seexy (6) - php out of memory (5) - aflam six arabic language (5) - php memory_get_usage (4) - php script running out of memory (4) - Out of memory php (4) - out of memory in php (2) - memory_get_peak_usage (2) - php script uses too much memory (2) - how much memory php script (2) - AFLAM ARBI (2) - memory_get_usage wordpress (2) - wordpress memory script (1) - php script run out of memory (1) - php script causing out_of_memory (1) - aflam six arbi (1) - php script meory (1) - php scripts out of memory (1) - memory script php (1) - how many memory php scripts (1) - running out of memory in php (1) - php script out of memory (1) - aflam egybte (1) - php how much memory consumed in script (1) - php out of memory log (1) - php scripts using too much memory (1) - php memory script (1) - high memory php scripts (1) - php out of memory error (1) - wordpress error Out of memory (1) - php large script memory (1) - how to memory php should a script took (1) - art egybte (1) - why is script on my website running so high (1) - increase PHP script memory (1) - php is running out of memory (1) - php script takes too much memory (1) - sex egybte (1) - memory_get_peak_usage in php (1) - aflam egybte 2008 (1) - php run out of memory (1) - php how much memory (1) - rss.php out of memory (1) - php web page error running out of memory (1) - my ipod running out of memory recently (1) - www.xxxl.tv..com (1) - php script too much memory (1) - php out of memory Out of memory (1) - php how much memory is my script using (1) - memory_get_usage php (1) - php script memort (1) - my php (1) - Out of memory, php (1) - running php in memory (1) - script running (1) - script memory in php (1) - how much memory consumes my php script (1) - determine memory required for a php script (1) - wordpress out of memory (1) - php script using too much memory (1) - memory_get_usage out of memory (1) - memory_get_usage memory_get_peak_usage (1) - www . egyBt memory . com (1) - uses of myphp (1) - memory_get_peak_usage wordpress (1) - .seexy.com (1) - what is a high php memory_get_usage (1) - how much memory do php scripts use (1) - which php script is using memory (1) - error running out of memory in php (1) - php memory_get_usage incorrect (1) - memory_get_peak_usage -manual (1) -