I'm using public $timeout = 3600 inside my job and tries => 1 in horizon.php and I got Illuminate\Queue\MaxAttemptsExceededException: A queued job has been attempted too many times. The job may have previously timed out..
[2017-08-18 02:56:48] Processing: App\Jobs\VideosJob
[2017-08-18 02:58:19] Processing: App\Jobs\VideosJob
[2017-08-18 02:58:19] Failed: App\Jobs\VideosJob
[2017-08-18 03:01:53] Processed: App\Jobs\VideosJob
The job runs one time until finish like how I want and the process it's not killed. Weird!
With tries => 0 my output is
[2017-08-18 02:45:28] Processing: App\Jobs\VideosJob
[2017-08-18 02:46:59] Processing: App\Jobs\VideosJob
[2017-08-18 02:48:29] Processing: App\Jobs\VideosJob
[2017-08-18 02:50:00] Processing: App\Jobs\VideosJob
[2017-08-18 02:51:04] Processed: App\Jobs\VideosJob
[2017-08-18 02:51:04] Processed: App\Jobs\VideosJob
[2017-08-18 02:51:04] Processed: App\Jobs\VideosJob
[2017-08-18 02:51:05] Processed: App\Jobs\VideosJob
The job runs four times. 馃槩
My job fails every 90 seconds even I use public $timeout = 3600 inside job or 'timeout' => 3600 in horizon.php.
The 90 seconds comes from 'retry_after' => 90 inside queue.php config. I tried to put 300 instead 90 with a timeout of 10 seconds and 2 tries. The job is killed after 10 seconds without any error like A queued job has been attempted too many times. The job may have previously timed out.
Did you figure this out?
You should add "timeout" => 300, to the horizon queue workers environments array
Should I also set retry_after more that 300 second or not?
How can I set configuration per job ??
i just want to set $timeout = 172800; for one single job not for all my jobs.
Most helpful comment
You should add
"timeout" => 300,to the horizon queue workers environments array