Question

I've been using delayed_job without issues for a while now; mostly for queuing ActionMailer calls (Notifier.send_later ...). Lately it sends out random multiples of emails from the same job. I'll queue one email and I'll receive it five times, or once, or twice, all at the same time. I've restarted delayed_job and it seems to behave for a bit. Anyone experience this?

This is my log; I've never seen these errors before...

# Logfile created on 2010-02-11 by logger.rb
*** below you find the most recent exception thrown, this will be likely (but not certainly) the exception that made the application exit abnormally ***
#<NameError: uninitialized constant Delayed::Worker>
*** below you find all exception objects found in memory, some of them may have been thrown in your application, others may just be in memory because they are standard exceptions ***
#<NoMemoryError: failed to allocate memory>
#<SystemStackError: stack level too deep>
#<fatal: exception reentered>
#<LoadError: no such file to load -- tmail>
#<SystemExit: exit>
#<NameError: uninitialized constant Delayed::Worker::Merb>
#<NameError: uninitialized constant Merb>
#<NameError: uninitialized constant Delayed::Merb>
#<NameError: uninitialized constant Merb>
#<NameError: uninitialized constant Delayed::Merb>
#<NameError: uninitialized constant Delayed::Worker::Merb>
#<NameError: "Gems::DelayedJob-1.8.4::Lib::Delayed::Worker" is not a valid constant name!>
#<NameError: uninitialized constant Delayed::Worker>
Was it helpful?

Solution

When you deploy a new version of your application, make sure to kill all DJ workers and start up only 1 (or however many you want - start with 1 to debug this issue).

ps -ef | grep delayed_job

OTHER TIPS

I was having the same problem, when i checked my Queue I found that I was having an error in the job and the DJ was trying to run again and again this job.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top