Search code examples
rubyruby-on-rails-3resque

Rails Resque workers are getting killed


I'm running Redis, where resque works picks up tasks from redis and executes it.

When i start the resque workers

COUNT=3 QUEUE=* bundle exec rake resque:workers

I can see the resque workers are started

root  15347 95.8  0.2 268804 98844 pts/1    Sl   10:59   0:16 /usr/local/bin/ruby /usr/local/bin/rake resque:workers
root  15383  0.0  0.0  67752 17860 pts/1    Rl   10:59   0:00 /usr/local/bin/ruby /usr/local/bin/rake resque:work
root  15385  0.0  0.0  71872 18100 pts/1    Rl   10:59   0:00 /usr/local/bin/ruby /usr/local/bin/rake resque:work
root  15388  0.0  0.0  67752 17856 pts/1    Rl   10:59   0:00 /usr/local/bin/ruby /usr/local/bin/rake resque:work

But after few seconds, these works are getting killed. I tried using VERBOSE for seeing the log. But its not giving any error.

  1. Is this a problem with redis or resque?
  2. How to fix this so that i will not lose any data saved in redis?

Solution

  • The Resque workers were killed because I have removed a class from the background job, and the resque workers were searching for the class.

    When the class is not there, it has failed and was killed without giving any error!