I’m running Laravel 9.19 on two environments: development and production.
The batch job system works fine in development, but in production, the pending_jobs count in the job_batches table is going negative.
I can’t figure out why this is happening only in production.
I tried comparing both environments to ensure they have the same configuration.
I expected the pending_jobs count to decrease as jobs are completed, but instead, it drops below zero in production.
The count is correct in development.