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.

Two entries cause reverse related entries to give blank page

March 28, 2010 6:41pm

Subscribe [8]
  • #31 / Apr 09, 2010 1:51am

    John Henry Donovan

    12339 posts

    walpow,

    Your Relationship cache which is kept in the DB is quite large. Can you check with your host as your database may be running out of space which would make sense here. It is probably trying to cache all your relationships but running out of space and failing to return them.

  • #32 / Apr 12, 2010 2:40pm

    walpow

    133 posts

    I’m hosted at Enginehosting and here’s what they said:

    We don’t have hard limits on the amount of database space clients are allowed so if it were running out of space it would be causing issues on the database cluster your account is on.  Your current database size is 57 mb in total and the relations table is 46 mbs. 

    Does this help in the troubleshooting process.  Also did you inform the ExpressionEngine support that you are hosting on Enginehosting.  They know our servers pretty well so that may help give them some insight.

    Thanks,
    Nathan

  • #33 / Apr 12, 2010 7:38pm

    Brandon Jones

    5500 posts

    Thanks, walpow. We are pinging the dev team to see if we can get to the bottom of this, and we’ll update this thread when we know more. Thanks for your patience.

  • #34 / Apr 13, 2010 5:09pm

    Robin Sowell

    13255 posts

    Just a quick update to let you know we’re looking at it.  The issue is basically memory.  With the test data and a limit of 40- it’s pulling back around 950 reverse related entries.  I’m going to try some tweaks w/how we handle the main loop to see if we can get the memory use down.  Will update once I’m done experimenting with the options.

  • #35 / Apr 14, 2010 3:00pm

    Robin Sowell

    13255 posts

    OK, walpow.  I’ve added a tweak that greatly reduces the memory use when handling the reverse related when dealing w/huge numbers being returned.  I’d still lean way from pulling in too many, as it may slow things down a bit.  But the ee_support/index test template is looking good w/out a limit (granted, there are not a ton of main entries).

    Test out your problem spots, and see if this has solved them.  I’ll get busy getting the revised code into the official build.  Let me know how it goes.

  • #36 / Apr 14, 2010 3:37pm

    walpow

    133 posts

    Success! The real page that had the problem is working successfully. Thanks for everyone’s work on this.

    When you say you added a tweak but it’s not in the official build, I’m assuming you’ve updated my copy of modules/weblog/mod_weblog.php, since I see the filedate has changed. Correct?

    Thanks again,
    Nathan

  • #37 / Apr 14, 2010 3:52pm

    Robin Sowell

    13255 posts

    Correct- you’re running a slightly modified mod.weblog.php.  Well- for the record:

    @@ -545,8 +556,10 @@
             
             $entry_data = array();
             
    -        foreach($query->result as $row)
    -        {    
    +        for ($i = 0, $total = count($query->result); $i < $total; $i++)
    +        {
    +            $row = array_shift($query->result);
    +
                 /* --------------------------------------
                 /*  If the data is emptied (cache cleared or first process), then we 
                 /*  rebuild it with fresh data so processing can continue.

    I replaced the foreach with the for and $row= combo.  I can’t SWEAR this will make it into the next release, in which case, you’d want to redo the hack.  It WILL make it into a release- but I want to put it through more testing as well as see if there’s another spot I can make a similar change. 

    Make sense?

  • #38 / Apr 14, 2010 4:18pm

    walpow

    133 posts

    Perfect sense. I pulled down a copy of the module to remind me to deal with it if I install another build or release. Then I can come back to this thread and redo the hack if necessary.

  • #39 / Apr 14, 2010 6:40pm

    Brandon Jones

    5500 posts

    walpow,

    I’ll leave this thread open for now. Glad we were able to get to the bottom of this.

  • #40 / Jun 16, 2010 6:13am

    FountainInternet

    53 posts

    Just wanted to add a note to this thread to say that I had exactly the same issue, and the posted fix works for me (for now at least). I’ll also look into getting my memory increased to act as an additional protection against this happening.

    Simon

  • #41 / Jun 16, 2010 8:58am

    Sue Crocker

    26054 posts

    Simon, glad this helped. Don’t hesitate to post again as needed.

  • #42 / Aug 03, 2010 6:59pm

    Brandon Jones

    5500 posts

    Thanks all; closing this thread.

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

ExpressionEngine News!

#eecms, #events, #releases