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?



  • 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,

  • 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....


  • 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:



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


    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,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.