I am creating a Laravel 4.2 app with MySQL database on NGINX. I am trying to research options to reduce CPU usage at any given time using queues.
I would like any queued task to stay under a certain level of memory usage;
but what I do not understand is what actually happens if the task being run exceeds that limit set by the --memory
parameter of php artisan queue:listen
(or work ).
If I run
php artisan -h queue:work
in my dev terminal, it simply defines
The memory limit in megabytes (default: 128)
but it does not say what will happen if that task tries to break that limit.
2 different things I think may happen:
1) it will cause the queue to fail and end up on my failed queues table
2) it will somehow just throttle the amount of processing power from the server to accomplish the task
I am hoping it is number 2; am I correct?