It's probably better to introduce a second server that will process all the jobs. This is called a worker server. It will only process any new jobs from the queue. On your application server, you just create the jobs and don't hammer down on the CPU anymore.
Aug 30, 2020
2
Level 10
How to prevent artisan command from killing my system?
I have an artisan command that I need to exectue on my live server. It takes about 5 hours. How can I run this command, without using all system resources (CPU/Memory)? I don't care if it even takes a week, I just want to make sure its not using 100% of my system resources (it creates a lot of mysql queries). Its also possible to split the command in many jobs, but then I still don't know how to tell the jobs not ot use 100%. Is there any solution for this kind of issue?
Please or to participate in this conversation.