1

I'm running Laravel queue with that command :

/usr/bin/php7.2 artisan queue:listen --timeout=0

But the process keeps stopping at 300 seconds with that error :

Symfony\\Component\\Process\\Exception\\ProcessTimedOutException(code: 0): The process [...] exceeded the timeout of 300 seconds

I've also tried to set timeout in job's class :

public $timeout = 5000;

Anyone know what to do? This process is for video encoding so a bit long running.

Thx!

2 Answers 2

1

As indicated by the ProcessTimedOutException, the Symfony Process is actually timing out, not the Laravel Queue. If you know and expect the process to be long running (video processing for example), then set the timeout in Process class to null to indicate no time out, as follows:

...
$process = new Process($command);
$process->setTimeout(null);
...
Sign up to request clarification or add additional context in comments.

1 Comment

Actually, artisan queue:listen is being executed by the Symfony Process component. It might very well be the case that that's the one who's causing the timeout. Although, it is weird that Laravel isn't honouring the specified timeout.
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 you increase speed, you can make multiple jobs cath queue.

  1. Get data by page.
  2. Push page to the queue
  3. Job will handle data by page. If you want to increase speed, make multiple processes handle jobs.

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.