resque / resque-scheduler

A light-weight job scheduling system built on top of Resque
MIT License
1.74k stars 481 forks source link

Resque scheduler with only delayed job #466

Open vivianxu08 opened 9 years ago

vivianxu08 commented 9 years ago

I'm setting up resque scheduler, only for a delayed job, on AWS ec2 instance. So I wrote a script to run at start time during deploy,

bundle exec rake environment resque:scheduler BACKGROUND=yes >> log/resque_worker_SCHEDULER.log 2>&1

Everything works fine if I run rake resque:scheduler manually,

However, after sometime the resque-scheduler process will just die, specifically. the first a few jobs after the new worker is deployed will be able to be processed, but the sub sequential jobs are not, as the resque-scheduler dies itself.

for example,

[ec2-user@ip-172-31-13-199 current]$ ps aux | grep schedule
webapp 31814 0.0 5.4 498276 111668 ? Sl 08:37 0:00 resque-scheduler-4.0.0[sandbox]: Schedules Loaded

After a while if there is no incoming jobs, the process 111668 will just die.

Notice, my Resque.schedule is empty, as I have nothing scheduled to run, but only delayed job.

Why is that? Is there anyway to help me debug?

carsonreinke commented 8 years ago

Try turning on the VERBOSE mode with VERBOSE=true and see if any additional output. Not having a schedule should not terminate the process, it should log that (see https://github.com/resque/resque-scheduler/blob/v4.0.0/lib/resque/scheduler.rb#L88).