Sometimes server-connection seems to be lost

What issue or error are you experiencing?

Discovered issue since last Local update (maybe existing before, bot not evident for me):
Working in website, all is fine, and then all is stopped:
a) Saving webpage lasts forever (no end)
b) Actualization (Webbrowser) from webpage does not work

The time period until problem occurs is different, but every time after several changes, savings and page-views (so between 2-15 Minutes of work).
Tried to isolate the problem with 3 sites open in the same time, working in demo 2 - til problem occurs.
2 control sites worked without any problem, when demo2 stopped.
(But problem occurred also with other sites in the past.)

Re-Starting site from Local (=> WP Admin) works every time.
Sometimes refreshing page in Browser with [Strg]+[Shift]+[R] works also (sometimes on the second or third try), but unsaved work is lost!
Sometimes on such page refresh tryouts there is an error message (from Local or Browser?) that suggests the site is offline.

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

I don’t know. There is no certain action to repeat.
Maybe I added some word in a paragraph and Saving does not work.
Or Saving worked, but the preview of the webpage afterwards does not. (Opening a fresh preview or reload of an existing preview in a second tab.)


System Details

  • Local Version:

  • Version 9.0.5+6706

  • Operating System (OS) and OS version:
    Windows 10 Home 22H2

Working in Google Chrome (actual release)

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)
error.log (7.7 KB)
local-lightning.log (14.7 KB)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @burnuser

What type of connection do you utilize?

Do you have anything like a VPN, hotspot, broadband or do you use an office wifi network?

What about security, antivirus or firewall programs or extensions that could be doing any sort of throttling?

Thank You for your quick respond!

About connection:
I use Local on a local computer, opening sites on the same local computer in a local webbrowser. => No other connection between Local and website than local computer itself.
I tried Apache and nginx in Local with same site, but same problem, no mater which server I use.
(The computer itself has a permanent cabel connection to router and - afterwards - my internetprovider. But this connection works stable without any problem and does not affect the pure local problem anyway.)

About security:
I use Avast Free, but without firewall and I got no messages or problems from this side.
Windows asks for permission - and gets it - when adding new sites. That’s all.

I checked log files before and yesterday there is a time coincidence in error.log at 2024/09/05 18:17:11 when the error occured. But on all other occasions there were no log entries with same timestamp as the error.
That’s why I used 2 control sites yesterday, which still worked when one site stopped.
=> Computer is OK, Browser is OK, Local as a whole is OK, only one site (demo2) was lost - until several reload attempts in browser brought it back to work.
But that’s - without saving content loose - is no solution for regular work :frowning:

So if you work with other sites, or for example a new, blank Local site do you ever run into this issue or is it only happening on this specific site?

If it’s only happening on the specific site then something else within the site might be conflicting. You could try disabling all of the plugins, or swapping the theme to see if the issue persists. You could also try using a debug tool like Query Monitor to see if it shows any spikes.

If you want to try disabling all of the plugins or swapping the theme via CLI you can click on Site Shell in your Local app (under your site name) and run something like wp plugin deactivate --all for example.

We have some details on the above in our performance guide that might be helpful too:

The error occurred with different new blank sites.
And the browser console doesn’t show any errors.
I tried with disabled WordPress plugins, without success.
I tried another browser (Brave instead Chrome) without browser plugins, without success.

But I found a configuration, that works: changing a site from http to https (Local: SSL => Trust)
That was a first success!
But for some reasons I need working http sites too. (Especially for WordPress trainings with a lot of WordPress newbies.)
So, having a possible http/https connection-problem in mind, I extended my research to standard-browser options, attached to connections.
In “Privacy and Security”, for good luck, I turned “Use Secure DNS” OFF.
Which worked with http sites too!
(Chrome Help says: “Important: If your device is managed or parental controls are turned on, you can’t use Chrome’s secure DNS feature.” => Maybe also problematic with local websites?)

That’s all somehow strange and I’m not entirely satisfied with this two solutions in my trainings:
1.) SSL is a training target, but not at the beginning.
2.) Turning a central browser security option OFF - only for Local and WordPress - seems eventually a bit frightening for my newbies

Using Local with http sites AND “Secure DNS” ON would be my favourite, but I can’t figure out where they are clashing. (Maybe Local technicians could find the problem?)

So, my hopes are, that - maybe - in a future version of Local all works out of the box.
Meanwhile, I have at least 2 not perfect, but somehow working solutions.

I’m glad you’ve been able to figure out some workarounds here for now @burnuser

It does seem to be an issue between Local and the browser, specifically that Secure DNS feature. We haven’t seen any other widespread reports of this being an issue, but, since Local needs certain permissions, we do see occasional issues with things like security, antivirus, and firewall applications that need to “allow” Local for it to function smoothly.

You might also want to check your Router Mode. If you’re wanting to work in HTTP you could switch to Localhost and then if you change to HTTPS you could work in Site Domains. This might also impact whether or not the Secure DNS feature flags the site.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.