Error appearing: Connection lost Saving has been disabled until reconnected

I'm getting reports of this error message, on 3 out of 2000 ish sites on our multisite. I've installed the Heartbeat control plugin on a site and set the frequency to 60 seconds and control heartbeat locations to Allow only on post edit pages. I'm also trying disable everywhere on another sub site.

This issue started on version 4.5.4, I updated to 4.6.1 and still seeing it.

Any idea how to fix it?

Thanks!

Matt

  • Predrag Dubajic

    Hey Matt,

    Hope you're doing well today :slight_smile:

    If Heartbeat didn't help on your case you should start by checking if plugins or theme is causing this, perhaps an incompatibility with WP 4.5.4+, so try disabling them and check if the issue is still there after that.

    If that doesn't give any results it might be good step getting in touch with your hosting provider as they will be able to check server logs and provide you with more info about why this is happening.

    Best regards,
    Predrag

  • Matt

    Predrag Dubajic Not so good. You know how it is when WP is being a pain. I am the hosting provider! There is nothing helpful in the logs I can see.

    A bit more on the behaviour. When the connection lost error message is displayed, the post is actually published. SBE sends out emails no problem. So the error message is a red herring. However users are reporting that there browser locks up and they cannot post again.

    It's happening on different sites all with different themes, so I doubt it's a theme issue.

    Plugin checking time, argh....

    Matt

  • Adam Czajczyk

    Hello Matt!

    You're initial diagnose regarding Hearbeat API seems correct however that's not always the reason. It may as well be a result :slight_smile:

    I think checking plugins is definitely an essential step here.

    Also there are two other "tweaks" that may be worth giving a try (one or the other one or both at once):

    1. play with AUTOSAVE interval:

    define( 'AUTOSAVE_INTERVAL', 160 ); // Seconds

    That should be added to the "wp-config.php" file of your site above the "/* That's all, stop editing! */ line and also you may want to play with "160" value a bit, probably increasing it even further (though please note: the higher the value the bigger the content loss chance!)

    2. make sure that WP is tweaked to use available resources:

    a)

    define('WP_MEMORY_LIMIT','256M');

    where "256M' value should be substituted with the value of maximum allowed PHP memory

    b)

    PHP "max_execution_time" option; that should be set to a reasonably high value e.g. 180 or even 300 seconds;

    That is because the error that you are getting is usually caused by a server throwing "500" or "403" HTTP status (which is an error status) in response to some admin-ajax calls.

    Still though, most likely that'd be caused by some plugin which may not even be necessarily "bugged" itself but may just "interfere" in case of this particular setup. So, the plugin test would be very important here.

    Best regards,
    Adam

  • Simplebutcreative Media

    I'm actually having this issue now and I only have 6 websites in my network. But then again I'm on a shared hosting account. I'm actually looking into upgrading to the next level of hosting whether it's VPS or Cloud. It looks like my new client website is using up my resources. I'm using Membership 2 plugin for his website with about 70+ pages. Haven't brought this issue up until now. I'm just assuming I need a better hosting service plan.

  • Simplebutcreative Media

    Adam Czajczyk

    Yeah I'm really considering upgrading...But I just chatted with my hosting now. They said the issue is not necessarily my hosting plan. It could be a theme or plugin. They mentioned that there's too many request with my cron jobs php and index.php

    They suggested I setup a real cron job instead of the default and a bad bot blocker to my htaccess.

    https://github.com/bluedragonz/bad-bot-blocker/blob/master/.htaccess

    The error shows up when I add a new page and setup the "membership access". I am using Membership 2 plugin.

    I don't really have any experience with cron jobs...

    Thanks for the reply!

  • Simplebutcreative Media

    Adam Czajczyk

    After getting support on this...The conclusion was that my PHP max execution time is too low. My shared hosting with Siteground has a PHP global limit of 120 max execution time. I really need to upgrade to something with no PHP global limits. I would like to upgrade to Siteground cloud but I don't want to pay $80/mo right away. Any suggestions on a good cloud or vps hosting with FULL let's encrypt integration through cPanel? Something under $60/mo...

  • Simplebutcreative Media

    Adam Czajczyk

    I'm actually testing Inmotion Hosting Standard VPS plan now. I think as far as performance it's definitely much better than my high tiered shared with Siteground. As it should since it's a VPS level of hosting. But the fact that they don't have full integration with Let's Encrypt is deterring me from making inmotion my new home.

    Also, inmotion's support response is not as good as Siteground. Siteground has almost no hold time for me through chat.

    The support just added Let's Encrypt to their AutoSSL feature out of courtesy. That's great! But I also need to be able to install Let's Encrypt Wildcard SSL. I need the wildcard for my multisites. I can only install the basic ssl certificate.

    At this point in time, I don't have enough customers to buy a premium wildcard ssl. Free wildcard from Let's Encrypt is great solution for a startup growing business like mine.

    I might just be forced to upgrade to Siteground's Cloud Hosting. It's more convenient since I don't really have to migrate anything. Plus Siteground's cloud is actually a dedicated server. Inmotion's VPS plans are all shared.

    I need to make a decision soon. It's affecting the whole performance of my main multisite project.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.