time limit for hung jobs?

31 views
Skip to first unread message

anato...@gmail.com

unread,
Jul 10, 2013, 3:49:42 PM7/10/13
to queue_...@googlegroups.com
Hi,
   I'm using queue_classic 2.0.0 in a project with several named queues of jobs, with one or two workers depending on the queue.  I had a situation recently where one job in one queue seemed to get hung up for literally days. The worker process was still in memory, it just wasn't progressing for some reason. Of course, that job was locked, and I only had one worker on that queue anyway and it was hung up. So no further work got done in that category of jobs.

   Any thoughts on how to monitor the jobs and impose a time limit before transitioning to a clean up method if the worker doesn't finish in time?

Thank you.

Ryan Smith

unread,
Jul 10, 2013, 4:34:20 PM7/10/13
to queue_...@googlegroups.com
That sounds like a bad situation. I have a couple of ideas:

1) You might consider wrapping your worker code in a timeout. You can do this pretty easily with Ruby's Timeout module in the stdlib.

2) What sort of logging/visibility situation do you have? I typically keep a chart of a queue's throughput. If the queue is important and assumed to be busy all of the time, I setup an alert if the throughput ever falls below a threshold. Are you familiar with Librato and Papertrail?

3) You might benefit from a potential feature I have discussed in a related issue. https://github.com/ryandotsmith/queue_classic/issues/165#issuecomment-20457285



--
You received this message because you are subscribed to the Google Groups "queue_classic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to queue_classi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages