BuddyDev

Search

Slow website due to admin-ajax.php

  • Participant
    Level: Initiated
    Posts: 15
    Kerem Erdal on #19009

    Hi,

    I have a buddypress website. When i refreshed the network button on google chrome devtools it shows admin-ajax.php for one user approximately 200 ms every second.(Isn’t it working in every 15 seconds) When visitors come the website, I am looking at network button at devtools and i see multiple admin-ajax.phps for each visitors(each of them is approximately 200ms) So, my server cannot handle visitors. I installed Heartbeat Control Plugin but nothing changed. Is it normal for 200ms delay for each visitor? How can i fix it? I cannot make the advertisement of the website due to this reason.

    My Plugin List

    All in SEO
    Antispam Bee
    Buddypress
    Buddypress Anonymous Activity
    Buddypress Global Search
    Fast Velocity Minify
    Heartbeat Control
    Really Simple SSL
    Redis Object Cache
    Restrict Usernames Emails Characters
    Simple Custom CSS
    Theme My Login
    WP Fastest Cache
    WP Mail SMTP

    Theme
    MyThemeShop Gridblog

    My Server Spec
    4 Core 8GB VPS processor
    Nginx
    Redis

    Thanks,
    Kerem

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #19023

    Hi Kerem,
    I am sorry but I don’t see any issue with 200ms time. It is pretty fast to be honest.

    Also, Yes, It is common to have multiple ajax request being sent. For exampel, BuddyPress uses it to show latest activity without reloading page.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 15
    Kerem Erdal on #19027

    Hi Brajesh,

    Thanks for your answer. For one user, 200 ms is pretty fast but when the number of visitors increased, 200 ms increases dramatically.(it passes 2 sn easily with a few visitors) Is it normal?

    Also, i want to ask question. Is it possible to run Buddypress without problem by disabling admin-ajax.php calls. (I know latest activity without reloading page will not work but it is not problem for me) When i disable the heartbeat by the below code the activities and groups are not loading. Is it possible to load activities and groups without problem by disabling heartbeat? If so, how?

    add_action( 'init', 'stop_heartbeat', 1 );
    function stop_heartbeat() {
    wp_deregister_script('heartbeat');
    }

    Thanks,
    Kerem

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #19035

    Hi Kerem,
    If it increases that much, It is not normal.

    You don’t need code to disable the heartbeat used by BuddyPress. You can disable it from BuddyPress settings page by uncheckign this option

    
    Activity auto-refresh	
    

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved