3

I'm using Laravel Sail on a WSL2 instance, on Windows 11 (Home). The project I'm working on is installed in the WSL filesystem, as I always do.

After executing any sail command, there's a delay of ~10 seconds before the command output is shown.

I've noticed that running the same commands directly with docker compose, has a little delay(~1.5sec), but nothing compared to sail.

Docker Compose

$ time docker compose exec laravel.test php artisan

docker-compose exec laravel.test php artisan  0.04s user 0.02s system 1% cpu 3.323 total

Sail

$ time sail artisan

sh $([ -f sail ] && echo sail || echo vendor/bin/sail) artisan  0.27s user 0.29s system 5% cpu 9.623 total

Ok, now that's weird! time reports that sail is executing the command in 0.27s, but as you can see from the following screen recording, that's not the case at all!

enter image description here

Please, if you know what can be the cause of this, let me know.

  • I always used Laravel Sail / Docker without any problem, even if I'm using WSL (some people say it's slow, but I'm not of the same opinion).
  • I already checked other answers without any luck.
  • I'm not sure if this depends on my machine setup, or it's related to the version of the involved software.
  • The project is using Laravel 9.x and Laravel Sail 1.41
  • Before writing this post, I tried to switch my WSL instance from Ubuntu 22.04 to 24.04, but the problem persisted.

Thanks

3 Answers 3

8

New release of Docker Desktop 4.39.0 do fix the issue. Download here : https://docs.docker.com/desktop/release-notes/#4390


I'm experiencing the same problem since last week.

It's not only impacting sail commands but also a wide range of CLI commands, and it's platform independent. The bug has been reported on Windows, Linux and Mac.

It is a version specific problem with the latest Docker Desktop version 4.38.0 The reason has been identified here https://github.com/docker/compose/issues/12511#issuecomment-2629057980 and here https://github.com/moby/moby/issues/47439

Regarding HTTP calls, you can try changing the User-Agent, but for commands there is nothing one can do.

Sign up to request clarification or add additional context in comments.

6 Comments

Thanks Pierre, I'll wait for the next release then!
Previous versions can be found in the Docker Release notes docs.docker.com/desktop/release-notes
To install the previous version, run this in powershell: winget install Docker.DockerDesktop --version=4.37.1 (Docker Desktop must be removed first winget remove Docker.DockerDesktop - you will loose settings and data!)
Just a quick update: I can confirm that rolling back to 4.37.1 fixed the issue, now everything works as normal.
For information, 4.39 has been released and it fixes the issue. docs.docker.com/desktop/release-notes/#4390
|
6

I ran into the same problem as you described and couldn’t figure out what caused the significant lag suddenly introduced when running sail artisan commands.

The issue started right after updating Docker Desktop to version 4.38.0, but since I had never experienced any issues after an update before, I didn’t immediately suspect it to be the cause.

After reading your post, I uninstalled Docker Desktop 4.38.0, downgraded back to 4.37.2, and rebuilt Sail without using cache.

After that, everything was back to the speed I was used to.

Hope that helps!

Kind regards

1 Comment

Thanks Christoph, hopefully this will help other people with the same problem!
3

It looks like the new version 4.39.0 fixed it. I just tested it, and it worked for me.
https://docs.docker.com/desktop/release-notes/#4390

Finally, a fix for this issue!

1 Comment

Great! Thanks for posting this. I was waiting for Docker Desktop to show the 4.39.0 version, but it always showed the update to v4.38.0. In fact I had to do this in sequence 4.38.0 -> reboot -> 4.39.0 update. Just to be safe and don't loose the existing data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.