Reputation: 1845
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!
Please, if you know what can be the cause of this, let me know.
Laravel 9.x
and Laravel Sail 1.41
Thanks
Upvotes: 1
Views: 211
Reputation: 66
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.
It should be fixed with the next release. Downgrading Docker Desktop sounds the only solution for now.
Upvotes: 5
Reputation: 41
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
Upvotes: 4