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

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-24-2007, 02:29 PM
New Pligger
 
Join Date: Oct 2007
Posts: 22
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.
Reply With Quote
  #2 (permalink)  
Old 03-07-2008, 01:46 PM
New Pligger
 
Join Date: Mar 2007
Posts: 10
I'm having the same problem, how did you solve it?
thanks
Reply With Quote
  #3 (permalink)  
Old 07-29-2008, 03:46 AM
Pligg Donor
 
Join Date: Mar 2007
Posts: 85
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
Reply With Quote
  #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.
Reply With Quote
  #5 (permalink)  
Old 02-04-2009, 05:21 AM
Casual Pligger
 
Join Date: Sep 2007
Posts: 66
if this is sollution then your the man.
Also tell me if this works for all fatal errors where out of memory is problem?
Reply With Quote
  #6 (permalink)  
Old 02-04-2009, 05:49 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 3,803
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

Now Available: Facebook Connect Module !
Reply With Quote
  #7 (permalink)  
Old 11-17-2009, 08:46 AM
New Pligger
 
Join Date: Sep 2008
Posts: 3
@betagirl thanks it also solved my problem.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg Errors tcritic Questions and Comments 4 09-01-2009 09:40 AM
Upgrading a 9.8.2 template to 9.9 AshDigg Wiki Articles 10 05-01-2008 01:38 PM
cann't vote in pligg (buliding 802) haxhax Questions and Comments 27 03-10-2007 06:53 AM
ERROR: my_base_url is not set. Please correct this using the admin panel. Then refres search Questions and Comments 7 11-14-2006 10:35 PM
/var/log/httpd/error_log messages gr8rcake Questions and Comments 3 01-28-2006 09:28 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development