How to debug Redis queue in Laravel - laravel

I'm new with Laravel, have implemented a queue with Redis and Supervisor installed to monitor but can't figure out somethings.
The Supervisor configuration is:
command=php <laravel path>/artisan queue:work --once
autostart=true
autorestart=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=<laravel path>worker.log
Questions:
Any error produced by a job executed by the queue will be stored in worker.log or depending on the error will be stored there or elsewhere?
How can I know the data of the job that is running?
How can know the queue content and if queue is working?
How can know if supervisor is working?

Taylor has built Laravel Horizon since 5.5. This is an absolute must if you have a job/queue-heavy application:
Laravel Horizon
While it takes just a little bit of configuration to get up and running, once you do, you'll have all the metrics and data that you need to monitor and inspect your jobs.

Related

Laravel Mail::queue and supervisor => Mails Delayed for the first time in a day

I have implemented laravel queue with supervisor on prod server. The problem i am facing is when i send mail for the first time in a day, the mail get delayed but the job is processed but after that first mail is received it works fine and there is no delay. I am facing this issue on daily basis that my first few mails get delayed and once they received everything works fine. How can i remove this initial delay of mail i am facing on daily basis. Below is my supervisor file.
[program:email-service]
process_name=%(program_name)s_%(process_num)02d
command=php path-to-project/artisan queue:work
autostart=true
autorestart=true
user=root
numprocs=3
redirect_stderr=true
stdout_logfile=path-to-project/storage/logs/email-service.log
Any help is appreciated.

Laravel queue calls on himself once again, now they are two competing queues

I have the problem of two competitive queues.
the first queue will be executed and if a job will be added to the queue, it creates a new instance from the queue.
But now they are two queues which work against each other.
Who could I prevent laravel to create a new queue process?
Supervisor config
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/releases/current/artisan queue:work --queue=mam
--sleep=3 --tries=3 --timeout=30000
autostart=true
autorestart=true
user=vierol
numprocs=1
redirect_stderr=true

Laravel - Is there a way to run a queued job from another queued job on different queue?

Imagine:
1- Eating job
2- Drinking job
3- Eating Queue
4- Drinking Queue
If I have an Eating Job running on Eating queue and from this job I want to run Drinking Job but on Drinking Queue.
Is it possible?
I just found what solves my problem.
Instead of using php artisan queue:work I used php artisan queue:listen on the job that runs another job on the different queue.
Looks like queue:work only runs that job on the queue and doesn't affect another queue but when I used queue:listen it works fine.
A note: This is helped in the windows machine while on linux server it works normally with php artisan queue:work

Elastic Beanstalk and Laravel queues

I'm implementig Laravel queues via database driver, and when I start the process for listening the jobs, another process is also started.
So basically I'm doing php artisan queue:listen and the process that is automatically started is php artisan queue:work.
so basically the second process here is generated automatically, also the thing is that it doesnt point to the folder where it should be
The listener:
php artisan queue:listen
starts a long-running process that will "run" (process) new jobs as they are pushed onto the queue. See docs.
The processer:
php artisan queue:work
Will process new jobs as they are pushed onto the queue. See docs.
So basically queue:listen runs queue:work as and when new jobs are pushed.
P.S: You need not worry about this but its good to know how it works. You can dig into the code if you need more information.

Laravel 5.4 beanstalkd multiple workers

I have a million tasks in the queue that sends bulk sms. I am using the beanstalkd driver to as my queue driver. I have installed beanstalk and supervisord on my ubuntu machine.
In the docs - http://supervisord.org/configuration.html i foundnumprocs=5 for instance. Does this create five workers?.
If i have two different workers, will i have 5 processes for each worker?.
See here the link to the Laravel 'config' regarding supervisord.
Queues Supervisor Config
In this example, the numprocs directive will instruct Supervisor to run 8 queue:work processes and monitor all of them, automatically restarting them if they fail.

Resources