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

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-24-2007, 03: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, 02: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, 04: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; 08-01-2008 at 12:13 AM. Reason: Found a solution
Reply With Quote
  #4 (permalink)  
Old 01-28-2009, 02: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, 06: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, 06:49 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM 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

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #7 (permalink)  
Old 11-17-2009, 09:46 AM
New Pligger
 
Join Date: Sep 2008
Posts: 3
@betagirl thanks it also solved my problem.
Reply With Quote
  #8 (permalink)  
Old 06-12-2010, 12:12 AM
New Pligger
Pligg Version: 9.9.0
Pligg Template: pliggbroadcast
 
Join Date: Jul 2008
Posts: 1
great !!!!
@betagirl thanks it solved my problem.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/log/httpd/error_log messages gr8rcake Questions and Comments 4 06-01-2010 12:25 PM
Pligg Errors tcritic Questions and Comments 4 09-01-2009 10:40 AM
Upgrading a 9.8.2 template to 9.9 AshDigg Wiki Articles 10 05-01-2008 02:38 PM
cann't vote in pligg (buliding 802) haxhax Questions and Comments 27 03-10-2007 07: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 11:35 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