- This topic has 12 replies, 2 voices, and was last updated 4 months, 1 week ago by Tom.
September 27, 2020 at 12:51 pm #1461372JORGE
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?September 28, 2020 at 9:47 am #1462557TomLead DeveloperLead Developer
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 🙂September 30, 2020 at 9:05 am #1465621JORGE
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:September 30, 2020 at 9:44 am #1465663TomLead DeveloperLead Developer
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.October 1, 2020 at 12:33 pm #1467929JORGE
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:October 1, 2020 at 12:53 pm #1467958TomLead DeveloperLead Developer
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?October 13, 2020 at 8:19 am #1486953JORGE
To reproduce the infinite pagination, just load the page and scroll down via scrollbar of your browser and at the same time open from inspecting mode (Network–>XHR)
Kindly make sure you use scrollbar from the browser, not the keypad or mouse scrolling.October 13, 2020 at 8:31 am #1486968JORGE
Check this video Tom, infinite-scroll is requesting every page until the last one comes:October 13, 2020 at 10:24 am #1487151TomLead DeveloperLead Developer
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?October 13, 2020 at 10:46 am #1487189JORGE
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)October 13, 2020 at 10:51 am #1487199TomLead DeveloperLead Developer
Here’s what I’m seeing in Firefox: https://www.screencast.com/t/88eDxNjd0pO
It shouldn’t be possible to reach the bottom and stay there while posts are loading, as the new posts make the page longer.
This is all infinite scroll functionality – not GP: https://infinite-scroll.com/October 16, 2020 at 9:03 am #1492213JORGE
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-onOctober 16, 2020 at 10:07 am #1492325TomLead DeveloperLead Developer
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).
- You must be logged in to reply to this topic.