Beta 4 - Blog index looping possibly caused server crash

Hi Guys,

An interesting one… I am not sure the exact cause of this, but I suspect it is linked to looping provider/consumer

I managed to get 178% cpu utilisation that required me to kill that application before my server came back up.

I suspect I somehow manged to create either a deadly embrace or eternal loop. I was trying to get a single hero post, followed by a page of 3 column posts. I used the Classic light posts template as the base then tried adding a row above the index accessing the first blog post. I also suspect I may have created a weird combo provider/consumer entries at parent & child levels of the post/posts divs

I realise this might be hard to replicate, but it does have the impact of bringing down the entire server, not just the development application

Let me know if you have any questions

Thanks Scot! Nice find here! Definitely need to get this figured out. Sounds like an infinite loop.

Was this Layout assigned to a particular context, or the whole blog? Or if it was the whole blog, do you have that blog set as your site home page, or is it loading from another page like /blog? Thanks!

You know what they say… “make something foolproof, they make a better fool”- That’ll be me haha

the blog was the /blog page showing the whole blog index

see the section below for a link to the blog index

Thanks! Ok, so I think you’ve been seeing a number of related issues (just checked into that pagination error you reported).

Here’s a development build where I’ve fixed the Blog page assignments.

Could you try a few things for me?

  • Delete your assignment rules, and just add a single new one set to Blog.
  • See if that fixes the pagination issue
  • Let me know if you run into the infinite loop again with these conditions in place… I don’t know if this fully solves it, but I think it’s a step in the right direction.
  • See if the preview switcher lets you get to the blog index. If it doesn’t, right click the preview icon and do “Copy Link Address” - let me know where it is trying to take you.

Thank you so much! Really appreciate all your help in this process.

Thanks for the link,

I’ve deleted beta 4 and installed beta 5 (just to be a little safer re caches)

  • Deleted the assigment rules and set a single one for Blog - That works great!
  • Pagination issue is still a problem
  • infinite loop - Something isn’t quite right, this dev site is pulling a lot of cpu time
  • My problem with the preview switcher is that once I first move away from the blog index to preview something else, there is no way for me to get back to the blog preview. the copy link address does point to the correct blog url

Hope that helps

Thanks! Would you mind if I logged into this site to check it out? I’m not able to reproduce the remaining issues so maybe seeing it live would help.

Sure I’ll add details below

Beta 5? Is that in some parallel universe I’m not part of?

Thanks Scot! I think I found the culprit. You have this redirect setup: /blog/* -> /* which is preventing redirecting /blog/page/2 to /page/2. That’s why the pagination isn’t working. After saving that, you might want to clear your cache because browsers typically remember 301 redirects. I didn’t test it, but that’s probably causing an issue with viewing the blog in the live preview as well.

Regarding the CPU usage, an infinite loop would be noticeable by the page not responding and probably capping out the memory limit. The higher than normal CPU usage could be due to more work being done to render elements. Unfortunately anytime a looper is enabled, it has to render the whole tree of elements again up to the nearest provider, which in the archive mode is the whole page. There are some more optimization levels I’d like to add here, but this update will be making the server work a little harder in some cases.

@BrandexPublishing We’ve not pushed beta5 yet, but earlier in this thread I uploaded a development build with a specific fix included.

Thanks for that @alexander,

pagination kind of works now… only now page 2 displays but it shows the same as page 1 (there aren’t enough posts to be a page 2 so why does it try?)

@scotbaston,

Looks like you turned on a Looper Provider on the Section. This will actually create a whole new WordPress query starting with the first post and is useful for nested loops or pulling in other data. If you turn that off, the layout will use the main query from the WordPress blog loop which will start your second page off with the right items.