-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Horizon jobs stay on pause after 5.6 upgrade #292
Comments
Yes, I am. I wrote about the issue on Laracasts and on LaraChat but no-one has commented on it. The entry is here at Laracasts. Most jobs would get stuck but a few went through. I came here to report this and saw your post. You're not alone! It was also throwing an exception every 3 minutes and filling the log. No jobs were dispatched but soon as I ran 'php artisan horizon' it would throw this exception every 3 minutes or so. I wasn't sure it was a local issue so I uploaded the code to my staging server on Ubuntu (Forge provisioned) and exactly the same thing. I rolled back to 5.5 and all is good. |
I have same trouble after upgrade to 5.6, Solved by set horizon version as 1.1.1, 1.2 seems not stable |
I upgraded framework to 5.6 again, same issue, downgraded Horizon to 1.1.1 and issue remained. Rolled back framework to 5.5 and ok again. Horizon 1.1.1 and 1.2 same issue for me. |
I'm having what is potentially the same issue. A job is dispatched (from a model observer) and the job is created: it's visible in the queue ("Recent Jobs") and the count under "Current Workload" for the queue reflects the jobs presence. However, at no point is the job ever executed. I have added logging to both the job constructor and the I have a command running every minute populating the queue with a couple of hundred jobs, with other jobs created on demand in response to a request. These jobs are all the same class, the only difference is the model passed in. The issue doesn't seem to have much of a pattern: it's occurring (as far as I can tell) exclusively with my jobs that are dispatched in response to a request. I can dispatch 20 jobs in a row manually and each will succeed, and then one might enter the limbo state, or a dozen might enter that state, or one might enter that state followed by success followed by another in that state. This issue appears to be most common when the queue is being populated, i.e if I add a job to the queue at the same time as my command is populating the queue it's more likely to enter the limbo state but given the seemingly random nature of this issue I'm not sure if that's just a coincidence. Laravel 5.6 I'm going to attempt to debug this more and will add anything I find here. |
Making use of
A job is pulled from the queue, it's added to ...whereas, looking at a job in limbo I see the
So the issue appears to be: for some reason, a job in the queue is being taken but not reserved and never processed, and therefore remains in limbo (status Since this works in Laravel 5.5 but not 5.6 then I'm guessing it's a Laravel issue, and the Laravel RedisQueue class was modified very recently, the |
As a temporary fix, adding
|
! Been fighting with predis for the whole day as I got a comment that this was not due to a Laravel issue. Glad I'm finding this thread. For me, killing horizon (and having supervisord restarting it) get the jobs through. But basically, I have to kill horizon after every job queued. |
@josiasmontag as far as I can tell, setting |
I am still experiencing this issue on Laravel 5.5 and Horizon 1.2.2, I have cleared my config cache and restarted supervisor (I also killed supervisor, killed horizon and ran it manually). If you follow 6fe4cd4 back it suggests this issue came about as a result to changes in the default config for 5.6, but I'm seeing it in 5.5 as well. Now all my dependencies have 5.6 support, I'll try updating it to 5.6 tomorrow and seeing how we get on. |
The problem persists, Laravel 5.6, Horizon 1.1.1, 1.2.3 (neither version works). Tried solution with setting |
Same as @cspshadx . My problem happens only with jobs that open a file in local disk. It seems that horizon is not so mature as we would want it to be. |
I started a new app When my job finished, horizon showed that the job finished successfully and it run for 831seconds. |
I found a workaround; run the standard |
I had Horizon setup for Redis queue. Everything was working fine.
Upgraded Laravel to 5.6, now jobs stay on "pause", about 1 on every 10 jobs actually finish processing, all others stay on "pause". Horizon log file also does not have anything about "paused" jobs.
Reverted back 5.5, everything works fine.
Anyone else having this issue?
The text was updated successfully, but these errors were encountered: