Reputation: 1490
I'm running queue listener with command php artisan queue:listen --sleep=10 --tries=3
on Windows 7 laptop. My computer has 4 core CPU and the process is constantly eating up 25% of my CPU load. I tried increasing sleep parameter, but it doesn't help at all. There are no jobs in the queue. I'm using database queue. How to solve it, my computer is getting very hot.
Upvotes: 2
Views: 1772
Reputation: 220066
Run it as a daemon to stop it from spinning up more and more instances of your app:
php artisan queue:work connection --daemon
From the docs:
The
queue:work
Artisan command includes a--daemon
option for forcing the queue worker to continue processing jobs without ever re-booting the framework. This results in a significant reduction of CPU usage when compared to thequeue:listen
command
Upvotes: 6