Local Community

Local unusable on Win 10 after 5.7.4 -> 5.8.1 update

Issue Summary

Constant 504 gateway timeouts since move to 5.8.1. Alsoi issue with uninstal of 5.7.4 not removing nginx.exe

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    Only have one small site.
  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Have not tried this, doesn’t seem relevant, but will give it a shot and update this post

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!
local-lightning.log (382.2 KB)


504 gateway timeous after upgrading to Local 5.8.1 from 5.7.4

I have been running Local (free version) 5.7.4 since it became available without incident.

I have a single, smallish WP site and am running the current version of Wp - 5.5.1. I upgraded to 5.8.1 two or three days ago, and have been plagued by 504 Gateway timeouts ever since (to the point that the Local site is unusable- a couple og page changes and I have to restart, and eventually have to restart local and finally the whole system to be able to just view the site, much less work on it).

In the process of troubleshooting this, I have several times uninstalled 5.8.1, and reinstalled 5.7.4. At first this seemed to help. I decided to restore 5.8.1 to gather symptoms and logs for submitting a problem report but happened to notice that Local’s directory tree under Program Files (X86) was still present. In the interest of thoroughness, I tried (and failed) to delete the directory tree, with a warning that the tree was not empty. A quick exploration revealed that everything except nginx.exe was gone, so I tried to delete it, but could not because it was still running. Evidently, neither exiting Local nor running the uninstall process had failed to stop nginx.exe, but the uninstall reported no error. I used task manager to kill the process, then deleted the tree successfully and re-installed 5.8.1.

At first this seemed to correct everything, as the 504 errors seemed to be gone. I then stopped the site and started it again, only to get a 504 Gateway timeout. Looking at task manager, I noted that there wer 4 instances of a Local sub-process under the main Local process, and two instances of nginx.exe. after starting and stopping a few more times, I had, under the main local.exe process, two intances of Apache (the site is set up for apache), 2 instances of CGI, 7 instances of Console Window Host, 4 instances of Local, mailhog, mysql, and two instances of nginx. This doesn’t seem quite right, but who am I to say. I then stopped the site, and exited Local.30 minutes later, I still have running a local.exe process with a console window host and an nginx.exe subprocess. I have attached screen captures of Task manager illustrating the above narrative. The Local Monitoring mini in the last capture is not yours, rather it belongs to Acronis (an image/cloud backup tool which I have used for several years, recently updated to 2021 version). I believe Local has a problem, likely since 5.7.4, as at the very least the uninstall should have stopped and removed nginx.exe, or at least complained if it could not. The install should have complained as well, as it could not have successfully replaced nginx.exe while it was running.

I will also gather todays Local log files and attach them. Any guidance would be welcome. I can provide a backup of the Wp site or take one of the local site if that would help you. I am willing to try additional troubleshooting that you might require in resolving this.

System Details

  • Which version of Local is being used? 5.8.1

  • What Operating System (OS) and OS version is being used?

    • For example: macOS Catalina or Windows 10 Professional
      Windows 10 Pro 64bit, version 2004, OS build 19041.508, Windows Feature Experience Pack 120.2212.31.0; Intel Core i7-8750H CPU @ 2.20Ghz 2.21 GHz, 32GB installed Ram
  • Attach the Local Log. See this Community Forum post for instructions on how to do so:

Hi Robert,

Thanks for the fantastic breakdown, we appreciate it!

Can you please give Local 5.8.2 a try? It should resolve any performance issues in the UI caused by 5.8.1.

1 Like

I downloaded 5.8.2, then uninstalled 5.8.1. As before, a copy of ngnix.exe was still running (evidently left from yesterday…), so the program files (x86)/local tree was not removed, nor was ~appdata/roaming/local/. I killed the nginx.exe instance with task manager and deleted both trees.
I then rebooted. I tried to install local 5.8.2 by right click on the exe and choosing “run as administrator” after a brief show of the spinning disk, no UI appeared for several minutes, and no evidence of the install process was visible in Task manage. I tried again just double-clicking on the installer executable, this ran and installed. On running the new version, the first dialog said there were no sites installed (I had NOT removed anything in the Local Sites folder, and the site folder and files were present there…). I renamed the site folder and tried creating a new site with the same name as before. The UI seemed to hang on “starting up site services” I waited 10 minutes, and seeing everything idle in task manager, stopped Local. Thinking I might have made a misstep, I repeated all of the above steps - uninstall, clean folders, install, start - same complaint that no sites existed. created a new folder (Backup) in the Local Sites folder and moved the original site there., then tried again to create the original WP site. Same symptoms - hung at “starting local services”.
So, it appears I’ve gone from working fine in 5.7.4, to working but unusable due to 504 timeouts in 5.81, to utterly broken in 5.82. The attached zip file contains screenshots and logs from this frustrating morning’s play. I look forward to better suggestions.local problem info 5.8.2 12-0ct-20.zip (383.8 KB)

after further investigation, I have determined that removing the APPDATA/Roaming/Local folder is the cause of the 5.74/5.81 sites not being discoverable by 5.8.2. restoring that folder from backup allows Local to discover the existing site. I still have to stop and manually delete one instance of nginx.exe to be sure that no components to be installed remain active. I still have 504 Gateway timeouts very frequently. I will be re-installing 5.8.2 this morning and continuing troubleshooting but felt the info on the cause of the disappearing sites was worth sharing quickly to avoid anyone wasting time on it.

1 Like

With 5.8.2 I was able to reduce the 504 Gateway timeouts to only 1 in 2 hours, which is acceptable. The primary fix came not from 5.8.2 itself, but from excluding the LocalSites and Appdata/roaming/local folders from real-time malware protection (Acronis).

1 Like

Thanks for following up with all of these details @Robg45!

I know that there is an ongoing bug in Windows where the nginx process of the router isn’t cleanly shut down. For your info the router is a proxy so that Local can translate the site domain of something like example.local to the actual port that the WordPress site is listening on, something like localhost:10012.

The fix of disabling real-time protection does make sense, since I could see a tool like antivirus locking a file (like a raw DB file) and preventing MySQL from giving a response to PHP, which in turn generates the 504 error you are seeing.

Other pieces of software that might cause a similar outcome are things like a file-syncing service – ie, if something like OneDrive is locking a file as it is syncing it, then similarly, MySQL won’t be able to generate a response!

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