ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Fatal error during edit query

August 06, 2008 11:43am

Subscribe [3]
  • #1 / Aug 06, 2008 11:43am

    maadmac

    224 posts

    I updated a clients EE install from 1.6.3 to 1.6.4 last night.

    Now, when we query for comments on the Edit page we’re receiving this error:
    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /www/pmh2822/public_html/mdncp/db/db.mysql.php on line 389

    This error is primarily produced when we don’t use any other filters.

    Any suggestions?

    -Patrick

  • #2 / Aug 06, 2008 11:52am

    Ingmar

    29245 posts

    Pretty straight forward: you need more memory. Shouldn’t be an issue, since you seem to be at EH? Just open a ticket with them.

    ETA: Nevermind, 64 MB should be plenty.

  • #3 / Aug 06, 2008 11:54am

    maadmac

    224 posts

    That’s what I assumed. Any reason why this problem would start to show up now?

  • #4 / Aug 06, 2008 11:59am

    Robin Sowell

    13255 posts

    EH sets a high memory limit- seems odd to me you’d be running out via a query.  Can you paste the relevant code- might be looping something fierce or something.

  • #5 / Aug 06, 2008 11:59am

    Ingmar

    29245 posts

    EE 1.6.4 needs slightly more memory than 1.6.3? A few things have changed, more stringent XSS checking and such.

  • #6 / Aug 06, 2008 12:06pm

    maadmac

    224 posts

    Robin-

    Here is the function for the db.mysql.php file that the error is coming from:

          // Fetch the result of the query and assign it to an array.
          // I know, the result *is* an array.  But we want our own
          // numerically indexed array so we can cache it.

          $i = 0;
          $result = array();
          while ($row = mysql_fetch_array($this->query_id, MYSQL_ASSOC))
          {
    $result[$i] = $row;
    $i++;
    }

    I haven’t been able to reproduce the same error just searching other weblog data, something that would also be passed through this fetch process.

  • #7 / Aug 06, 2008 12:11pm

    Robin Sowell

    13255 posts

    I meant more- what’s your template look like.  I’m wondering if there’s like a weblog tag nested inside a category tag that’s resulting in the generation of 500 weblog tags or something.

  • #8 / Aug 06, 2008 12:15pm

    maadmac

    224 posts

    Oh, sorry about that.

    This is occurring in the Control panel, under the Edit tab so it would be the cp.publish.php file.

    Not sure where to pin-point it from there.

  • #9 / Aug 06, 2008 12:17pm

    Robin Sowell

    13255 posts

    Dang- my bad.  I was completely misunderstanding.  Looks like you’ve got 64MB memory.  That should be plenty for the cp.  What’s your build number- it’s in the footer.  And how many comments do you have on the site?  And any extensions?  Lastly- just choosing ‘comments’ from the filter and nothing else is generating the memory message- right?

  • #10 / Aug 06, 2008 12:27pm

    maadmac

    224 posts

    Build:  20080710
    Number of comments: 514178
    Extensions: only have Comment Spam Prevention installed.

    And yes, only when just comments is select does the error produce. Given the number of comments I’m not surprised this is occurring. I was more curious if this was and issue with the upgrade, or if this would lead to more issues.

  • #11 / Aug 06, 2008 12:38pm

    Robin Sowell

    13255 posts

    I believe that build tweaked a few things on the CP Home page to increase efficiency.  But otherwise- I think Ingmar’s right- it was probably an incremental increase in memory needs and enough comments added to push it over the top.  (And that extension shouldn’t be in play, so don’t think that’s it.)

    Still- seems to me more tweaks can be made.  Let me give the crew a ‘heads up’ on this one.  See if they have ideas.

  • #12 / Aug 06, 2008 3:36pm

    Derek Jones

    7561 posts

    maadmac, I inserted 700,000 or so lorem ipsum comments onto my site, and it does take some time to search:

    Script executed in 15.9860 seconds   18 SQL queries used   8,165 KB of Memory

    But it doesn’t take additional memory to handle.  Do you mind emailing me via my profile page with super admin and FTP access to the site in question?  I can do some non-invasive (visible only to me) debugging to see what’s causing this.  It could be that the circumstances of my dataset are unable to adequately replicate what you have.

  • #13 / Aug 06, 2008 3:42pm

    maadmac

    224 posts

    Derek-

    I’ve sent you the information you’ve requested.

    -Patrick

  • #14 / Aug 06, 2008 6:40pm

    Derek Jones

    7561 posts

    Ok Patrick, what it boils down to is that when you enter no keyword and search in “Comments”, MySQL is returning over 500,000 rows of content which ExpressionEngine then processes in order to give you your results.  The resulting array is just too large, and the script runs out of memory.

    My first thought was that ExpressionEngine shouldn’t even allow that type of search, but it’s conceivable that maybe someone would want to see all comments from a particular category from a particular weblog, and not want to refine it further with keywords.  With your particular data set on the current version of ExpressionEngine, if you do wish to perform a “show all” type search on 500,000+ comments, you’ll need to increase the amount of memory to your PHP environment.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases