Delayed_job dies with an error - leaving work in a locked state

After the DJ dies, the log files do not indicate anything.

works: ./script/delayed_job status

gives: pid-file for killed process 1143 found (/appPath/tmp/pids/delayed_job.pid), deleting. delayed_job: no instances running

Strange if I use: ./script/delayed_job run It will work great in the foreground! And never dies.

Tried many versions of delayed_job and mongoid with the same results.

Does anyone know how to debug?

Using:

rails (3.2.7)

delayed_job_mongoid (2.0.0)

mongoid (3.0.3)

delayed_job (3.0.3)

+4
source share
2 answers

Off delayed_job performing a task that caused a segmentation error that could kill the delayed_job daemon.

After debugging, it turns out that Random.rand() will lead to a reproducible segmentation error when running in a demonized environment. This is due to the initial sowing and tuning of a random generator, which, apparently, is not processed properly by daemonize.

Solution: Random.new.rand()

+6
source

I am wondering if the strange behavior in this overflow of DJ magazine magazine by magazine could explain the behavior you had. The answer also seems plausible. Strange things happened.

Pt 2: Permission issues? may also be deleted. Is it in production or dev? Does he work in Dev?

PT 3: On the github DJm page Make sure you are using MongoDB version 1.3 or later. You? pt 4: and this? script/rails runner 'Delayed::Backend::Mongoid::Job.create_indexes'

Finally, to date, DJM runs red on Travis, with some bugs that may affect you. Once I had a crappy build in a gem, making me drink only to fix after 2 days. http://travis-ci.org/#!/collectiveidea/delayed_job_mongoid/jobs/1962498

If this is not the case, drop it into the Gemfile folder, add binding.pry to this script, starting at the top and working down.

+1
source

All Articles