salsify / delayed_job_worker_pool

Worker process pooling for Delayed Job
MIT License
36 stars 13 forks source link

I create delayed job to recurring run but it stop when working for 1 or 2 day later #10

Closed aquadrehz closed 3 years ago

aquadrehz commented 4 years ago

I set it to run every 15 second as the following

    begin
      monitor_running_tasks
    ensure
      delayed_job = DelayedJob.where("handler like '%recurring_monitor%' and locked_at is NULL").first
      if delayed_job.nil?
        interval = 15.seconds.from_now
        self.delay({:run_at => interval}).recurring_monitor
      end
    end
aquadrehz commented 3 years ago

After clean dirty data and tweak to 2 instance on 2 docker. It's not occured again.

I suggest it caused from memory leak and some thread issue