• Resolved B. Martins

    (@b-martins)


    I have found the solution for the WordPress connection loss problem on shared hosting. I have noticed somebody reporting that it i8s caused by the EDD plugin. I am also using EDD and started checking this out. I used P3 Performance checker to test the loading times of my plugins. To cut it short this is what I found and this is the solution for the connection loss problem:
    1. Many plugins loaded very slow including EDD.
    2. This was caused by the new WordPress Heartbeat Api function that was introduced since Wp 3.6. This new feature is especially devastating with shared hosting.
    3. You can either completely disable this function or control it by means of a plugin to get rid of the connection loss problem
    4. I have noticed that I do not need this function at all so I completely disabled it.
    5. This was the end of my connection loss problems. Edd then loaded exceptionally fast as well as my other plugins. Loading times increased from 33 seconds to 17 seconds.

    Read all about the Heartbeat Api function here: https://www.siteground.com/tutorials/wordpress/limit-wordpress-heartbeat.htm

    Usually, you can completely disable it if you’re the only person working at any given time in your site and you know that you don’t have any important functionality that heavily relies on it to work properly.
    To disable it, go to the functions.php file of your theme and paste these lines right after the opening <?php tag:

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

    This will completely disable this functionalioty and it will no longer add to the executions number and CPU time used in your account.
    How to Limit HeartbeatIf you don’t want to stop Heartbeat completely, you can simply limit the execution frequency. You can do this by using a plugin called Heartbeat Control.
    Simply install it by following the instructions in our tutorial on How to Install WordPress Plugins and activate it. Then go to Settings -> Heartbeat Control and from the Override Heartbeat frequencydropdown choose 60 seconds. Finally, save the settings and that’s it.

    I hope this helps someone.

    https://wordpress.org/plugins/easy-digital-downloads/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Connection lost. Saving has been disabled until you’re reconnected.’ is closed to new replies.