We have a bunch of SQS jobs that we watch for and process using Laravel's php artisan queue:listen
.
Periodically, has a few minutes' blip and SQS times out. When this happens, queue:listen
aborts with a message like:
[Symfony\Component\Process\Exception\ProcessTimedOutException]
The process "php artisan queue:work
--queue="https://sqs.us-west-2.amazonaws.com/*******/queue"
--delay=0 --memory=128 --sleep=3 --tries=0 -env=production"
exceeded the timeout of 60 seconds.
I've tried handling the exception in app/start/global.php
and alternatively app/start/artisan.php
:
App::error(function(Symfony\Component\Process\Exception\ProcessTimedOutException $exception) {
// do nothing
});
Unfortunately, the exception still occurs and my queue:listen
still dies.
How can I catch this exception and ignore it for a retry?
If it helps, I use SupervisorD for running crons and I have that fire off a queue:work every second, I don't have any issues with SQS then.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With