0

So, I configured my QUEUE_DRIVE with redis.

The queue.php:

    'redis' => [
        'driver'     => 'redis',
        'connection' => 'default',
        'queue'      => 'default',
        'expire'     => 90,
        'retry_after' => 550
    ],

Supervisor is configured like this:

command=php /home/xxxxx/domains/xxxxx/public_html/artisan queue:work redis --sleep=3 --tries=5 --timeout=500

The job is being dispatched like this:

    $job = (new CreateOrder($orderHeaderToPush, $order->order_id))
                ->delay(Carbon::now()->addMinutes(1));
    dispatch($job);

I need the --tries argument to be bigger because there are multiple users doing this operation at the same time.

PROBLEM

Inside the job I have a Log::Debug. After 1 minute the job is dispatched - order comes in - No debug logging present. After a long time (the 500s) the job is dispatched again, this time logging with Log::Debug.

What exactly is happening? the job is not failed. How can it run without accessing the Log::Debug but doing other methods?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Tudor-Radu Barbu
  • 444
  • 1
  • 11
  • 28
  • You don't need that much *retry_after*, 30 or 60 should be better and you should see your debug log before the job timeouts. You should setup a fail jobs table for your queue and check why it might be failing https://laravel.com/docs/5.6/queues#dealing-with-failed-jobs – thefallen May 23 '18 at 12:32
  • That is the problem. They are not `failed`. I've added 30 or 60... same problem – Tudor-Radu Barbu May 23 '18 at 12:36
  • Same problem here, i'm running supervisor with database queue. I've still not found a solution! – Desh901 Jun 15 '18 at 08:48

0 Answers0