Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mrpoth's avatar

Laravel Horizon - Batch jobs shown as pending but actually failed

Hi everyone,

I'm using Laravel Horizon to monitor my queues, which includes batches.

Some of these batches are showing a number of jobs as pending, but there are actually no pending jobs showing in Horizon, and the jobs from those batches are in the failed jobs screen.

Is this a bug or intended behaviour? My batches have the allowFailures() method chained, so I understand that the batches may be marked as "completed" even with failed jobs. The issue is that the failed jobs are not marked correctly, so I have no way of knowing if the jobs in the batch are actually still pending or if they have failed, unless I crawl through Horizon manually.

Has anyone ran into a similar issue?

Also, I can see why the jobs have failed but it doesn't really make any sense. In my job, I pass in a user_id, use that to get a user (User::where('id', $user_id)->first()) and then call another method from the user. I can see in Horizon that the payload does include the user_id, and if I manually retry it in Horizon, it always works.

Any ideas would be much appreciated.

Thanks

0 likes
0 replies

Please or to participate in this conversation.