delayed_job
delayed_job copied to clipboard
Worker crashes and keeps poison-pill-job in queue
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.