Automattic / kue

Kue is a priority job queue backed by redis, built for node.js.
http://automattic.github.io/kue
MIT License
9.46k stars 867 forks source link

Stuck Kue Job #1109

Open shriramshankar opened 7 years ago

shriramshankar commented 7 years ago

I have seen some posts on jobs getting stuck in inactive status. eg. here #660 . The Kue documentation suggests that workaround for this is to call the "watchStuckJobs" function. I have also seen some posts where #1032 and #1075, where the recommendation is not to use "watchStuckJobs". Wondering, how I would troubleshoot the stuck job issue?

btok commented 7 years ago

+1

yongdange commented 7 years ago

So far, we have the same issue, after running a couple of days, the queue stops to process the tasks.

behrad commented 7 years ago

I have seen some posts on jobs getting stuck in inactive status. eg. here #660 . The Kue documentation suggests that workaround for this is to call the "watchStuckJobs" function. I have also seen some posts where #1032 and #1075, where the recommendation is not to use "watchStuckJobs". Wondering, how I would troubleshoot the stuck job issue?

Have you also tested with v1 branch?

DipakTechifySolutions commented 6 years ago

@behrad : can you provide me an answer of my issue? https://github.com/Automattic/kue/issues/1122

pencilcheck commented 6 years ago

I get a lot of inactive jobs and active jobs, and they are stuck and not moving after leaving it overnight. All tasks are 0%. Sometimes to resume running all I need is to manually restart some tasks in each queue, not working all the time but why? And why is it stuck like that?

cristianfd commented 6 years ago

I've the same problem as @hc-romens but my problem is after 5-10 jobs processed (the active queue is empty and the inactive is with jobs). The inactive queue works if I click on reset button or the job ttl expires (I don't know if the ttl affects inactive jobs). I pulled the master branch and the problem persist. Is the v1 branch different than master branch? @behrad @pencilcheck maybe your problem is in your code because the workers are 'working' (although they do nothing). First clean the active queue and then worry about the inactive queue.

cristianfd commented 6 years ago

About 'watchStuckJobs': I've tested manually (executing every command of the process with LUA) and the result is that all is OK (the watchStuckJobs do nothing because queue and pending are the same value). Maybe the worker is not notifying that it is unoccupied?

rpavez commented 6 years ago

I'm having the same issue, after some time it stop processing jobs, if I restart the process it resume processing jobs.