Thursday, March 2, 2017

Laravel Redis Queue Timeout 60s

I am running queue workers using supervisor as such:

[program:queue]
process_name=%(program_name)s_%(process_num)02d
command=php artisan queue:work --tries=1 --timeout=600 --queue=high,low
numprocs=8
directory=/home/forge/default
stdout_logfile=/home/forge/default/storage/logs/supervisor.log
redirect_stderr=true

I got my queue using redis configured as such:

'default' => 'redis',

'redis' => [
            'driver' => 'redis',
            'connection' => 'default',
            'queue' => 'low',
            'expire' => 600,
        ],

For some reasons, after 60s my job timeout.

A queued job has been attempted too many times. The job may have previously timed out

It's then processed again and fails every minutes until it's completed (3-4 mins).

Tried to --timeout=0 (to test) and the problem it still there. I also tried to add public $timeout = 600; to my job class, no luck. I restart my workers everytime.

What am I missing here?




via Wistar

Advertisement