Joomla out of memory error with exception.php

I’ve just suffered a strange out of memory exception with one of my Joomla sites. All the posts I read indicated that I needed to allocate more memory in my php configuration – crazy I thought – I already had 64MB allocated. There must be something more fundamentally wrong for this nasty gremlin to be happening. The actual error is–

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 40 bytes) in /home/site/public_html/libraries/joomla/error/exception.php on line 117

What I did (thanks to a couple of fragmented suggestions is change the line on 117 to the following

$this->backtrace = debug_print_backtrace();

Then re-render the site and you should see your browser fill with tons of crap. Hit the stop button after a second or two (before your browser crashes) and you should be able to see the root cause of your issue. For me it was a corruption of my jos_session table which I was able to fix with a truncate jos_session; command from the mysql command line.

I hope this note may save someone else a couple of hours of messing around with their memory settings.

Share

5 Responses to “Joomla out of memory error with exception.php”

  1. Phil @ March 10th, 2011

    Thanks! this tip has saved me a lot of time…

  2. Rino @ April 20th, 2011

    Thanks, saved me a lot of time too. Although i had to add a call to exit(); to really see the logging. My problem was that memcached was not installed (on my mac using MAMP)

  3. Prossy @ April 27th, 2011

    Thanks so much!! This has taken me 2 full days.

  4. Alexander @ June 8th, 2011

    Thank you!

  5. Ali @ August 20th, 2011

    you have saved my day. bless you.

Leave a Reply



*

Spam protection by WP Captcha-Free