-
Notifications
You must be signed in to change notification settings - Fork 724
Open
Description
Summary
We observe intermittent production errors in Horizon job storage:
ArgumentCountError: Too few arguments to function Carbon\\CarbonImmutable::addUnit()
The stack points to Laravel\\Horizon\\Repositories\\RedisJobRepository::pushed() where Horizon calls CarbonImmutable::now()->addMinutes(...).
Environment
- Laravel 12.51.0
- Horizon 5.44.0 (also observed earlier on 5.43.0)
- Carbon 3.11.x
- PHP 8.5.3
- ECS blue/green deployments
- OPcache enabled, JIT enabled in production
Behavior
- Error appears intermittently across different endpoints.
- After full redeploy/restart, errors temporarily disappear.
- First observed around 2026-01-22.
Relevant stack frame
Laravel\\Horizon\\Repositories\\RedisJobRepository::pushed()
$pipe->expireat(
$payload->id(), CarbonImmutable::now()->addMinutes($this->pendingJobExpires)->getTimestamp()
);Notes
- We use a custom Bus dispatcher, but this error consistently ends inside Horizon repository TTL calculations.
- We could not find any
CarbonImmutable::addUnitmacro/mixin override in our app code. - Similar runtime-level reports exist in php-src around PHP 8.5 + JIT/OPcache:
Temporary app-level shield
As a mitigation, we replaced TTL Carbon math with plain timestamp arithmetic in an app override of Horizon job repository.
Question
Have you seen similar reports in Horizon on PHP 8.5 + JIT/OPcache? Any recommended diagnostics from Horizon side to help isolate root cause?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels