Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronized file shares #103

Open
hamiltoni42 opened this issue Jul 26, 2024 · 2 comments
Open

Synchronized file shares #103

hamiltoni42 opened this issue Jul 26, 2024 · 2 comments

Comments

@hamiltoni42
Copy link

Hi,

I've been having some issues recently with Docker & Lando with Acquia sites. Docker just started randomly crashing with the error "Too many files". After a lot of head scratching (and wasted time), I cut my losses and tried using the Acquia virtual IDE product to at least get some work done.

While the Acquia IDE does it work, I prefer to work with Lando and I've been trying again to get Docker to work, this following a MacOS upgrade. So I did the following:

  • Uninstalled docker completely
  • deleted the ~/.lando folder
  • installed lando
  • installed docker
  • run lando install

I get the same result. All works for a while then docker crashes.

I see in the lando console a few messages like:

[+] Running 13/9
✘ Synchronized File Shares
✔ Container iidrupal8_mailhog_1

I checked in docker and there is a Synchronized File Shares for ~/.lando that is being created by Lando it seems. Synchronized File Shares seems to be a new feature in Docker (released Feb'04) and I suspect this is the issue. I cannot remove the file share since it is being used by the containers - dropping the containers and rebuilding with lando creates the file share - classic catch 22.

Is this a known issue with Synchronized File Shares and Lando? Perhaps it's a security config on my laptop? So, can I disable the creation of the fileshare in lando.yml (attached) and go back to relying on virtual file shares? In that way I can at least check if this is the problem.

Thanks, Ian

.lando.yml file:
lando.yml.txt

@rtfm-47 rtfm-47 removed the acquia label Jul 26, 2024
@rtfm-47 rtfm-47 transferred this issue from lando/lando Jul 26, 2024
@AaronFeledy
Copy link
Member

From a "tip" section at https://docs.docker.com/desktop/synchronized-file-sharing:

Compose can now automatically create file shares for bind mounts. Ensure you're signed in to Docker with a paid subscription and have enabled both Access experimental features and Manage Synchronized file shares with Compose in Docker Desktop's settings.

My guess is that you have these options set so that Docker Desktop is replacing Lando's regular bind mounts with the Synchronized File Shares because Lando is utilizing Compose behind the scenes. You may want to disable the setting that is making this happen automatically.

Alternatively, it seems you can add a .syncignore file file to a share to limit what gets shared. If the ~/.lando share is the cause of the "too many files" error, maybe we can reduce the number. Most of the files there are probably related to the plugins. It's probably safe to create a .syncignore in ~/.lando that contains **/node_modules to get rid of a lot of the dependency files, which is probably a large percentage of the .lando directory file count that does not need to get synced into the containers. You will probably need to lando rebuild for that .syncignore to take effect.

@hamiltoni42
Copy link
Author

Thanks Aaron, I will try the .syncignore - that seems a good solution to remove node_modules etc. There was still a problem with the Synchronized File Shares simply failing when Lando started the rebuild proceds. This seemed to be at every step. Odd.

I've downgraded my Docker version to 4.25 and logged out of docker. It seems this was the main reason that sync file option was being enabled during the Lando build since it's only available with a team licence. So I'm trying to reset using the original virtual file shares. If I get some stability (and get some work done!), then I'll build from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants