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 7403317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:02:32+00:00 2026-05-29T05:02:32+00:00

I recently added a delayed_job rap to my after_restart phase. Like so : system

  • 0

I recently added a delayed_job rap to my after_restart phase. Like so :

system "script/delayed_job stop"
system "script/delayed_job start -n 3"

Which works for the most part. Until I ran into a little snag today. I found an instance of delayed_job still running even after I repeatedly and manually did script/delayed_job stop.

I still get this :

user@ip-10-126-6-125 /data/HQ_Channel2/current $ ps aux | grep del
user   11034  0.0  3.4  74016 61964 ?        S    Dec05   0:19 delayed_job.0                     
user   11036  0.0  3.5  73660 63516 ?        S    Dec05   0:21 delayed_job.1                     
user   11038  0.0  3.6  73980 65256 ?        S    Dec05   0:17 delayed_job.2

Is it improper of me to be trying to close this via script/delayed_job stop ?

The only other way I know how to kill this is with a kill -9 , but isn’t this overkill? And what’s more, how would I implement that dynamically?

  • 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-05-29T05:02:33+00:00Added an answer on May 29, 2026 at 5:02 am

    I’ve had a similar problem.

    Check out Engine Yard’s delayed_job recipe, specifically its template with start and stop commands. It uses a script at /engineyard/bin/dj on your Engine Yard instance.

    <% (@num_workers || 1).times do |num| %>
      check process <%= @worker_name %>_<%= num %>
        with pidfile /var/run/engineyard/dj/<%= @app_name %>/dj_<%= @worker_name %>.pid
        start program = "/engineyard/bin/dj <%= @app_name %> start <%= @framework_env %> <%= @worker_name %>" with timeout 60 seconds
        stop program = "/engineyard/bin/dj <%= @app_name %> stop <%= @framework_env %> <%= @worker_name %>" with timeout 60 seconds
        if totalmem is greater than 300 MB then restart # eating up memory?
        group dj_<%= @app_name %>
    <% end %>
    

    When the stop script is called, it first uses kill -15 (TERM), waits for a grace period that defaults to 60 seconds, and if it’s still alive, then uses kill -9.

    Use Engine Yard’s script (and recipe, for that matter) if you can to reduce maintenance later. But if it doesn’t work for you, you can base your script off of these concepts. I’ve had some issues with it upgrading to Rails 3 so it may or may not work for you. I just contacted Engine Yard about it, but I doubt this is a high priority for them. Maybe if you contact them also, that will change.

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

Sidebar

Related Questions

I recently added CKEditor to my app and I would like to include my
I recently added some css to my website, it works perfectly fine in all
I recently added a new column called auth_token to my users which is suppose
I recently added User activity tracking functionality to my application which tracks user interaction
I recently added a script requiring vim-ruby, The question I have is similar to:
I have recently added a Photoswipe gallery to my website which has the following
I recently added a new mapicon_id field to my venue records which displays all
I've recently added a facebook like button to my site and it's causing a
I recently added an extra authentication backend to allow users to login using either
I recently added a stored procedure to my SQL Azure database. I added that

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.