sathish R
sathish R

Reputation: 422

Laravel Queue Timeout Error

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?

Upvotes: 1

Views: 973

Answers (2)

Tùng Phan Thanh
Tùng Phan Thanh

Reputation: 184

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

Upvotes: 0

Himanshu Sharma
Himanshu Sharma

Reputation: 456

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

Upvotes: 2

Related Questions