Pligg CMS Forums


Go Back   Pligg CMS Forum > Pligg Development > Bug Report



Fatal error: Out of memory - in /libs/ez_sql_core.php on line 374

Found or fixed a small bug in Pligg? Post it here so we can update appropriately.


 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-24-2007, 02:29 PM
New Pligger
 
Join Date: Oct 2007
Posts: 22
Fatal error: Out of memory - in /libs/ez_sql_core.php on line 374

Hello, my error was this one:


Fatal error: Out of memory (allocated 524288) (tried to allocate 37497571 bytes) in /libs/ez_sql_core.php on line 374


I deleted the content of CACHE folder and it works again, but what can I do to avoid having this problem next time again?

I'm using the latest version, 9.8.2

Thanks.
Sponsor
  #2 (permalink)  
Old 03-07-2008, 01:46 PM
New Pligger
 
Join Date: Mar 2007
Posts: 15
I'm having the same problem, how did you solve it?
thanks
  #3 (permalink)  
Old 07-29-2008, 03:46 AM
Pligg Donor
 
Join Date: Mar 2007
Posts: 85
Actual Solution

We initially set up a cron to delete the corrupt files created by the script - but that's hardly a solution as the site could go down before the cron kicks in, and be down until it does (we had it checking every 5 mins to be safe...but still...)

So here's a simple, better solution. Here's hoping the devs will include it in their next update. I just checked the 9.9.5 release and nope, problem still there. So here's what you need to do:

In libs/ez_sql_core.php - find:

Code:
if ( (time() - filemtime($cache_file)) > ($this->cache_timeout*3600) )
and replace it with:
Code:
if ( (time() - filemtime($cache_file)) > ($this->cache_timeout*3600) || (filesize($cache_file) > 2000000) )
This will delete the file if it's over 2MB and recreate it - thus no server crashing, and no need for a cron job.

Last edited by betagirl; 07-31-2008 at 11:13 PM. Reason: Found a solution
  #4 (permalink)  
Old 01-28-2009, 01:26 PM
New Pligger
Pligg Version: 9.5.0
 
Join Date: Dec 2008
Posts: 1
betagirl - thanks so much. Solved the same issue for me. Hope they include it in the next release.
  #5 (permalink)  
Old 02-04-2009, 05:21 AM
Casual Pligger
 
Join Date: Sep 2007
Posts: 55
if this is sollution then your the man.
Also tell me if this works for all fatal errors where out of memory is problem?
  #6 (permalink)  
Old 02-04-2009, 05:49 AM
Yankidank's Avatar
Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 2,916
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
This code was added to the 1.0.0 RC1 release so if you are running anything past beta 9.9.5 you're already covered

Need a Web Host ?
Save up to $84
when you purchase hosting from Dreamhost.com.
Use the coupon code PLIGG when buying a web hosting package from Dreamhost.com
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg Errors tcritic General Help 2 01-31-2009 01:12 PM
Upgrading a 9.8.2 template to 9.9 AshDigg Wiki Articles 10 05-01-2008 01:38 PM
ERROR: my_base_url is not set. Please correct this using the admin panel. Then refres search Installation and Upgrade Help 7 11-14-2006 10:35 PM

Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Use the coupon code PLIGG at Dreamhost.com to receive a discount of up to $84.00 Make a donation to support Pligg CMS development