solid_queue icon indicating copy to clipboard operation
solid_queue copied to clipboard

Missing job class completely blocks queue

Open namolnad opened this issue 9 months ago • 1 comments

Hi there,

This is something that's ultimately my fault, but I thought solid_queue could ultimately have some more defensive behavior. Here is an outline of the issue:

  1. During refactoring, I removed a Job class that was no longer needed
  2. After launching these changes, things worked as normal until a scheduled job of the removed class was due for execution.
  3. Upon scheduled execution, solid_queue tried to gain the concurrency lock, but the job class was nil when delegated to
  4. The nil job class caused the process to crash, causing the supervisor to fork the process and try again. This repeated continuously
  5. None of the other scheduled jobs were able to process, because the initial (nil class) job was blocking the queue from continuing.
  6. This should have been handled (and ultimately was) via removing the scheduled jobs for the removed class, but it seems there is room for some more defensive behavior, allowing the queue to continue processing and creating some kind of failed execution record.

Here is a screenshot of some of the backtrace during this issue:

Image

Thanks for considering and please let me know if you'd like any further info!

namolnad avatar Feb 24 '25 20:02 namolnad

Oh yes, indeed. I'll try to improve this, yeah.

rosa avatar Mar 05 '25 11:03 rosa