Description
I'm facing an issue in production: the SyncBudgetForOrganisationJob fails with MaxAttemptsExceededException after running for only 3 minutes.
Weird things:
- Works fine on localhost.
- Job timeout is set to
600(10 minutes). - PHP
max_execution_time = 300(5 minutes). - Queue
schedulerhasretry_after = 660seconds. - In
horizon.php,supervisor-4timeout is set to10 minutes(timeout => 60 * 10). tries = 1, but the payload showsattempts = 2.
Relevant code
Queue config (queue.php)
'scheduler' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'scheduler',
'retry_after' => 660,
'block_for' => null,
'after_commit' => false,
],
Horizon config (horizon.php)
'supervisor-4' => [
'connection' => 'redis',
'queue' => ['scheduler'],
'maxProcesses' => env('HORIZON_MAX_PROCESSES_SCHEDULER', 5),
'tries' => 1,
'balanceMaxShift' => 1,
'balanceCooldown' => 3,
'timeout' => 60 * 10,
],