Fatal error: Allowed memory size of 67108864 bytes exhausted

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
redfort
Forum Newbie
Posts: 1
Joined: Mon Sep 06, 2010 1:49 am

Fatal error: Allowed memory size of 67108864 bytes exhausted

Post by redfort »

Hi ,

As you may all have experienced this problem is there way we can non-healthy exit of script ..due to memory problem........???

I got to know..we avoid this......by properly managing our php memory by unset function. remove unusable variables and objects from memory......and increasing memory limit in phph.ini

Is there any way we can check each time inside the script -to check memory is available or sleep for some time and check again.......to proceed without exit........

Is there a way to catch this fatal error and take necessary steps to avoid exit........

Thanks,
redfort
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Fatal error: Allowed memory size of 67108864 bytes exhau

Post by josh »

Its probably a bug, more so than not unsetting a variable. I never unset objects or variables (PHP handles that internally). Debug with this - http://php.net/manual/en/function.memory-get-usage.php
Post Reply