[wp-trac] [WordPress Trac] #8594: Running out of memory when delete an article ...

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 12 17:26:16 GMT 2008

#8594: Running out of memory when delete an article ...
 Reporter:  ixiter          |       Owner:  anonymous
     Type:  defect          |      Status:  new      
 Priority:  normal          |   Milestone:  2.7.1    
Component:  Administration  |     Version:           
 Severity:  normal          |    Keywords:           
 .. and throws an error in line wp-includes/class.snoopy.php on line
 There are several problems. It tries to allocate $this->maxlength bytes
 for a file to read. maxlength is set to 500.000 - as good as any other
 "guessed" value. What if the filesize is higher? Usually the filesize is
 lower. So I patched line 894 and replaced it with:

 // $_data = fread($fp, $this->maxlength);
 $_data = '';
         $_data .= fread($fp, 10240);

 This might be slower. But we can ignore this, since it prevents us from
 running out of memory in low max_memory PHP environments. Less than or
 equal to 24MB.
 I have no idea what the other 23,5 MB were used for by WP, when I
 recognized this error?!

Ticket URL: <http://trac.wordpress.org/ticket/8594>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list