1

I am creating Laravel Jobs for sending emails and add them in Laravel Queue. Everything works fine, but the timeout of laravel queue is 300 seconds. How can I extend this time? Or I want to run this queue listen forever because anytime mails can be send due to user interaction. Any one can help?

2 Answers 2

2

To run a queue listener in the background, you need to configure it via Supervisor which is a process monitor for Linux. You can even assign the number of workers using this.

To configure the timeout, you can use the option timeout in the queue:listen command. The command will be:

php artisan queue:listen --timeout=500

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. But is there any option to run queue infinitely without supervisor.
If you are talking about local development, you can run your listener in one terminal tab or use shell. Or you can use 'sync' as a queue driver which does not require a listener to run but will execute your jobs synchronously.
0

The best way, You need separate data by page push to queue, instead of 1 queue large data, we have many queues waiting run backgrounds, if in you increase speed, you can make multiple jobs cath queue

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.