Site logo

Archived topic

Infinite request to all pages available?

12 replies · Started by JORGE on September 27, 2020

Viewing posts 1–13 of 13

GP is the best Theme we have used, but we have a serious issue with the infinite scroll in our big DB web site (we have more than 100,000 posts)

When the user scrolls down until the end of the footer, it will trigger an infinite request to ALL pages available, for example, the user was in page 5 and there are 50 pages available, so when user scroll down the system will make 50 requests at the same time to our database which will generate a 502 error page due to many requests at the same time.
A medium-small site won't have this issue, but it is lethal in a big one

We do want to have infinite scroll, is there any turnaround?

Hi there,

What page can I see this on?

Infinite scroll should only request the next page once it reaches the set threshold - it definitely shouldn't be requesting every page.

How do you know that's happening? What kind of debugging has been done?

Let me know :)

Hello Tom
If you open the browser console and scroll to the bottom of the page, you will found the pages request will be fired until the last page comes as shown in the attached video:

https://player.vimeo.com/video/463492811

Is infinite scroll turned off now?

Is this something you can reproduce on a simple test site? I'm not able to, the requests only happen as they're called.

Tom, I just turned ON the infinite scroll, so you can check it yourself, I'm also sharing admin credentials with you

This is what our host (Kinsta) wrote:
After reviewing the New Relic data, the largest impact to Superluchas.com performance is slow MySQL queries.
When pages are requested, such as /page/11 , the MySQL wp_posts select query is taking almost 30 seconds. Below, you can see screenshots of the summary and this page 11's transaction:

https://i.imgur.com/lDfAd4P.png

So I just tested this while viewing the Network page. The pages load as I scroll down as they should. If I scroll down all the way, only the one page loads and it makes the page longer, so I need to scroll down further to load the next one.

In your video you're scrolling down to the footer, but nothing seems to be loading on the actual page?

I can't reproduce that in Chrome, and for some reason there doesn't seem to be any infinite scroll in Firefox?

Here's what I'm seeing: https://www.screencast.com/t/Olj3sBsU

Where are the pages loading in your video? The actual page doesn't seem to be changing at all, yet all of those pages are loading?

Exactly, the current page does not change, but the pages are loading in the console, so, when several users do that at the same time, the server crashes, as Kinsta reported

Please, thy using Firefox inspecting mode (Network–>XHR)

I understand your point Tom, but (as Radiohead says) "this is really happening", was detected by NewRelic and It can be captured on video.
Let me check again on how to reproduce it, so can see it yourself.
Thank you as always.

Btw. We are not using any other infinite scroll add-on

What's the other infinite scroll add-on?

I would need to see the issue myself to get an understanding of what's going on. From your videos, it doesn't seem like anything is actually loading, or else the page would be getting longer on each load. It's just sitting at the bottom, so of course, infinite scroll will continue to load pages (it thinks you're at the bottom of the site).

This archived topic is closed to new replies.