Laravel queue process timeout error
After investing much time I got the solution
Add below line in Job class and your job run without time out, even if you put the job in a crontab entry
public $timeout = 0;
Adding --timeout=0
worked for my set up.
UPDATE:
The entire command would therefore be php artisan queue:listen --timeout=0
.
Hope this helps.
A queue is performed mainly for the requests which take a lot of time to get done link sending mail in bulk, import data queue jobs run in the background. it improves our web app performance too. If we don't set timeout it takes default 60 Sec. the time interval and if we set timeout as a 0, it means we set infinite timeout the request is continuously run till it won't complete. To set the timeout, we have to run this command: php artisan queue:listen --timeout=0
Here is the reference link of official document: https://laravel.com/docs/8.x/queues
This is a known bug in Laravel v5.3:
You should upgrade to v5.5 to fix this problem.
Another way is hacking the source code as explained here