High number of Ajax request

Posted in: Newspaper
Post count: 30

I am facing an issue with a high number Ajax request. I am already using HeartBeat plugin to control Ajax requests. But still facing issue with the following request. Please check :

/wp-admin/admin-ajax.php?td_theme_name=Newspaper&v=11.5.1
/wp-admin/admin-ajax.php

Screenshot: https://snipboard.io/aAnW43.jpg

Post count: 27744

Hello,

There would be some ways to reduce the number of queries, if you will consider them.
For one of the queries (sql_calc_found_rows):
Reduce the number of ajax usage on the website, as those are the ones that will make requests to load more posts.
So ajax features like ajax pagination – https://i.imgur.com/EfKi0za.pnghttps://i.imgur.com/sMeot5s.pnghttps://i.imgur.com/vrJq3BC.png
The ajax menus – https://i.imgur.com/n0K9hCN.png
Also the header live search makes requests when it is used – https://i.imgur.com/1ZvDwZx.png This can be deactivated when using a cloud header template. We added an option specially for it, as it can cause increased load on large websites.
The mega-menu pagination – https://i.imgur.com/T8kYzu4.png This can be deactivated when using cloud header templates, an option for this was also added for the same reasons mostly.

Thank you!

Post count: 9

Hi there. We are facing the same exact issue with high /wp-admin/admin-ajax.php?td_theme_name=Newspaper&v=11 requests. From our cache log, out of 80.000 requests, 43.000 are made to this exact address as POST. Hence the problem: they cannot be cached, resulting in high CPU usage. The site is youfly.com and we are a relatively medium to large news website with a lot of daily traffic.
99% of our traffic is “landing” on specific articles pages, so all the features you’ve mentioned above to OnlineTushar, except the search bar, don’t apply to our case. And even search is rarely used. We get /wp-admin/admin-ajax.php?td_theme_name=Newspaper&v=11 requests on each and every article load.
There has to be something we could do to bring this number down.
Please advise.

Post count: 9

Could this be happening cause of the “Ajax view count feature” that we have enabled?

Post count: 27744

Hello @youfly,

I saw that you have many blocks that use the next and prev ajax page, and then a request is made to the database when you click next or prev on the page.

Thank you!

Post count: 9

Fair enough but the request is made on each and every article load. Try it yourself: https://youfly.com/tileorasi/open-panagiotis-stathis-kai-evlabia-revi-mazi-ti-nea-sezon/ and watch the calls made without touching any button. /wp-admin/admin-ajax.php?td_theme_name=Newspaper&v=11 is being called every time. And what is it’s use by the way? To indicate the theme and it’s version? On every article load? Make a record of it somewhere (database, txt, xml) and fetch it from there.
Could this be happening cause of the “Ajax view count feature” that we have enabled?
Thanks.

Post count: 9

Another suggestion from the Kinsta support team, is to force cache on this call. Will that have any negative effects on the theme’s performance?
Thank you…

Post count: 9

Nevermind. I just figured it out myself :). For anyone else that might get stuck in this situation: it is indeed the “Ajax view count feature” which sends via POST the new views counter (increased by one) for the article in order to store it . So it can’t be cached if you want this feature to work properly. Disabling it is the only way to go…

Post count: 27744

Hi,

I’m glad you found a solution and solve it.

Have a great day!

Post count: 12

How to disable Ajax view count?

Have issue couse of it.

Post count: 27744

Hello,

You can disable the ajax view count from here -> https://i.imgur.com/BIwbscU.png

Thank you!

Post count: 12

Found it 🙂

Newspaper > Theme Panel > Post Settings > Ajax

Post count: 12

Thanks. I had this issue about 2 years. It has load to CPU, and was problem with hosting.

Viewing 13 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic.