delayed_job icon indicating copy to clipboard operation
delayed_job copied to clipboard

Truncated YAML crashes the delayed_job daemon

Open dball opened this issue 15 years ago • 5 comments

We were working with some beefy jobs that silently overflowed the default TEXT columns in mysql. The truncated YAML data were unable to be loaded, and were causing the daemon to crash. It looks like incomplete error handling in the job.deserialize method to me; the second YAML.load call doesn't have a rescue block, and the main rescue block for the method doesn't catch the YAML syntax error.

dball avatar Oct 30 '09 16:10 dball

similar error...has anyone got solution ??

sandipransing avatar May 24 '10 09:05 sandipransing

I've experienced the same thing! Also, using Class.delay.method(String), the string has some characters in it that cause deserialization to fail, thereby killing the whole thing.

aiwilliams avatar Oct 12 '10 13:10 aiwilliams

Me too - Seems like YAML chokes on some input. Is there a way to safely encode the data before passing to delay?

simianarmy avatar Aug 24 '11 18:08 simianarmy

When possible, it is more reliable to create a job using a unique identifier of a record, such as an ID, rather than the instance itself.

enthooz avatar Feb 28 '13 17:02 enthooz

Did anyone of you solved this issue?

I have a job on my table which won't be deleted as the YAML is truncated. ¿is it safe to delete if from the table?

Pryrios avatar Apr 04 '13 14:04 Pryrios