Notifications
Clear all

excessive admin-ajax.php requests

5 Posts
4 Users
0 Reactions
3,816 Views
(@futchief)
New Member
Joined: 6 years ago
Posts: 3
Topic starter  

Hello,

The wpDiscuz is causing for way too many admin-ajax.php requests on my website, to the point where I would have to upgrade my plan from the host. Is there a fix to this issue?


   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6147
 

Hi @futchief,

Please navigate to  Dashboard > Comments > Settings >  Live Update tab, t or increase the value of the "Update comment list every" option. 

live update

   
ReplyQuote
(@scottott)
Eminent Member
Joined: 6 years ago
Posts: 24
 

Are you saying the solution to excessive ajax requests is to deactivate the very reason I chose this plugin in the first place?


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 10 years ago
Posts: 4209
 

@scottott,

If your hosting plan has not enough resources to process such a big number of ajax requests you should turn it off or follow to these instruction:

1. Change hosting plan better and more powerful.

2. Set the checking period 30 seconds or more.

3. Disable AJAX requests for guests, only leave it for logged-in users.

4. Don't use tons of plugins, they are all loaded on each ajax requests, this is WordPress core working logic, all plugins do many processes on each ajax process so they make the live checking process dozens of times heavy. Keep light your WordPress and use less plugins.

5. Make sure you have some good cache plugin.

6. Make sure your website is not under Brute Force attack, install some security plugin or keep it secure using hosting service tools.

7. Finally just be notified, that we work on next major wpDiscuz version, it comes with many changes in live update and it'll work with less AJAX, even in most of working tme without ajax.


   
ReplyQuote
(@scottott)
Eminent Member
Joined: 6 years ago
Posts: 24
 

@tomson

Thanks for your reply. See my responses below...

If your hosting plan has not enough resources to process such a big number of ajax requests you should turn it off or follow to these instruction:

1. Change hosting plan better and more powerful.

Current plan 4GB RAM, 60GB SSD, 3TB transfer, 2 Core Processor. How much is enough?

2. Set the checking period 30 seconds or more.

It was set at 120 seconds before I gave up and disabled live updates.

3. Disable AJAX requests for guests, only leave it for logged-in users.

I had already disabled ajax for guests, who can't access anything anyway on the members-only site.

4. Don't use tons of plugins, they are all loaded on each ajax requests, this is WordPress core working logic, all plugins do many processes on each ajax process so they make the live checking process dozens of times heavy. Keep light your WordPress and use less plugins.

Hard to evaluate how many plugins are too many. Trying to run the site with what I consider essential functions to care for our Members.

5. Make sure you have some good cache plugin.

I can't figure out how to enable cache without disabling functions that update information in real-time. I have tried this a half-dozen or more times with the help of tech support at Cloudways (the host), and every effort to run Varnish on the server, or the Breeze plugin, or both, has affected the Member experience negatively. I wish I knew how to configure cache without messing up a Member's life.

6. Make sure your website is not under Brute Force attack, install some security plugin or keep it secure using hosting service tools.

Running WordFence Premium, which allegedly defends against Brute Force attacks, as well as other kinds. I've also blocked several IPs that according to our logs are hitting me thousands of times, and that appear on AbuseIPDB.com as bad actors. I've also blocked some that don't appear as bad actors, simply because they had hit the site more than 1,000 times.

7. Finally just be notified, that we work on next major wpDiscuz version, it comes with many changes in live update and it'll work with less AJAX, even in most of working tme without ajax.

That's great to hear. I'd love to reactivate live updates. Do you have an ETA for release?


   
ReplyQuote
Share:
Scroll to top