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

emiliosh's avatar

php artisan stuck if you have another php artisan running in background

Yes, I have detected that php artisan is stuck if I have another php artisan running in backgroup. For example I run: php artisan horizon & and then trying to php artisan migrate or just php artisan to bring whole list of options didnt work. Just freeze until I stop php artisan horizon. And then I can work with php artisan migrate. Any idea of what's happening? I'm using docker image php:8-apache. I wonder it could be related to php. I will tell you if I found out what is.

0 likes
5 replies
emiliosh's avatar

@Sinnbeck from the console inside the container.

php artisan horizon &

and then

php artisan

PS: I have tried php artisan tinker & and same problem next php artisan didnt work mmmm maybe something about php not artisan or laravel.

Sinnbeck's avatar

@emiliosh Does it return to the shell after you run the first command? (you should see the name of the container and user). Try hitting ctrl + c and then run php artisan horizon:status to see if it is running. If so you can now run another command.

What docker set up are you using ? Sail or similar?

emiliosh's avatar

@Sinnbeck no, it is based on php:8-apache custom image. But I know what it is. The problem was my PHPStorm listening for xdebug, when I stopped it the problem is solved. Thanks for your responses.

PS: this is my xdebug config

     echo "zend_extension=xdebug";\
     echo "xdebug.client_host=10.136.62.76";\
     echo "xdebug.mode=debug"; \
     echo "xdebug.start_with_request=1"; \
     echo "xdebug.discover_client_host=0"; \
     echo "xdebug.client_port=9001"; \
     echo "xdebug.log=/var/log/apache2/xdebug.log"; \
     echo "xdebug.max_nesting_level = -1"; \
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@emiliosh Ah yes, I have had that problem before as well. Remember to stop listening when not using it :)

2 likes

Please or to participate in this conversation.