Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

just-pthai-it's avatar

Php artisan serve suddenly response extremely slow

I run my Laravel app inside a docker container with command php artisan serve (using diff .env file) and the same Laravel app with command php artisan serve but this time is on my local computer. Everything work fine when using docker. But on local computer, it took too long to response (about 1 minute). I do not know why. I tried to search and found solution that using this command instead

php -S localhost:8000 -t public/

Ok this time everything back to normal, Laravel app response as fast as it used to be. But I need to know what wrong with the artisan command. Does anyone know why? Thank you!

0 likes
4 replies
tisuchi's avatar

@just-pthai-it Do you get the same performance with php artisan serve inside the docker locally?

tisuchi's avatar

@just-pthai-it Since php artisan serve works smoothly inside docker locally, then the easy solution would be just to use php artisan serve command.

In fact, it provides by laravel, so better use it.

1 like

Please or to participate in this conversation.