Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8768535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:05:39+00:00 2026-06-13T17:05:39+00:00

Rails 3.2.8, delayed_job (3.0.3), delayed_job_active_record (0.3.3). Using WEBrick. I have an initializer that asynchronously

  • 0

Rails 3.2.8, delayed_job (3.0.3), delayed_job_active_record (0.3.3). Using WEBrick.

I have an initializer that asynchronously populates the cache on startup:

MyModel.delay.get_lots_of_records
MyModel.delay.get_some_other_records
MyOtherModel.delay.get_tons_of_records
MyOtherModel.delay.get_some_other_records

In the development environment, this works fine, as evidenced by the delayed_job log and the cache log.

In staging, however, sometimes 1 or 2, or sometimes none of these jobs are executed. Usually at least one, typically the same one (but not always), is executed. If I look at the delayed_jobs table after startup, I see all 4 jobs get written and then vanish 2 seconds later.

Per the recommendation here, I have

# config/initializers/delayed_job_config.rb
Delayed::Worker.destroy_failed_jobs = false

But the jobs are still being very quickly deleted without failing or executing.

If I insert breakpoints at Delayed::PerformableMethod.perform, I see that method called only if the jobs are actually executed, so the problem is upstream of that. The destroy method is called after perform, though, so I’m not sure what’s going on.

I’m looking for troubleshooting recommendations or additional diagnostic actions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:05:41+00:00Added an answer on June 13, 2026 at 5:05 pm

    Sheepishly: I had a worker running in another environment, pointing to the same DB, that was running the jobs concurrently with my staging environment. This unintended consequence is a good reason to never share DB’s between environments.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a rails app that uses delayed_job. Whilst DJ gives me a really
My environment is rails 3.1, heroku bamboo stack, delayed_job_active_record, (https://github.com/collectiveidea/delayed_job ) and experimenting with
Rails has a nice idiom that makes it easy for you to have a
I have a Rails 3 background job (delayed_job) which sends a hipchat / Campfire
I have a rails app using delayed job, it works fine in development. However,
I'm using the delayed_job plugin in Rails to do background processing, and I'm experiencing
I working on rails 3.1.3 and use delayed_job 3.0.1 I have found some thing
I'm running Ruby 1.9.2/Rails 3.0.9. I am using the collective idea fork of delayed_job
I'm using delayed_job to run some background processes on my rails app. These processes
I have a Rails app that acts as a pass-through for an XML services

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.