delayed_job icon indicating copy to clipboard operation
delayed_job copied to clipboard

Worker crashes and keeps poison-pill-job in queue

Open fnordfish opened this issue 2 years ago • 0 comments

When a Job raises an exception with a non default encoded message string, Delayed Job crashes with Encoding::CompatibilityError.
Demo with stack trace: https://github.com/fnordfish/activejob-poison-pill-demo

When using SQLite as storage and a Job changes one of it's arguments to something incompatible with SQLite, it will crash with Encoding::UndefinedConversionError.
Demo with stack trace: https://github.com/fnordfish/activejob-poison-pill-demo/tree/sqlite-writeback

In both cases, the job stays in the queue and when restarting the worker, it will immediately retry that job, causing it to crash again.

I was originally investigating this as rails/rails#45418. Maybe ref #1157.

fnordfish avatar Jun 27 '22 08:06 fnordfish