workless icon indicating copy to clipboard operation
workless copied to clipboard

Rails 4 Support?

Open taylorbrooks opened this issue 11 years ago • 6 comments

I recently upgraded to Rails 4 and noticed my workers aren't shutting off.

Are there known issues with this?

taylorbrooks avatar Feb 17 '14 21:02 taylorbrooks

I had the same issue. The workers started correctly, but they didn't shut down. I updated my Gemfile to use the latest version instead of the version recommended in the Readme. Now it works!

Before: gem 'workless', '~> 1.1.3' After: gem 'workless', '~> 1.2.3'

ToniTornado avatar Apr 07 '14 08:04 ToniTornado

I am on workless 1.2.3, and ran into this issue (in local dev) seemingly out of the blue, not by a recent gem update.

I believe the issue was due to a delayed_job process that had not died. The way I discovered this was by the fact that when I stopped foreman, verified that passenger was not running (with ps -ef | grep pass), and then ran foreman start again, I got these log messages again every 5 seconds:

19:04:49 web.1  |   Delayed::Backend::ActiveRecord::Job Load (0.8ms)  SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE ((run_at <= '2014-08-13 02:04:49.190129' AND (locked_at IS NULL OR locked_at < '2014-08-12 22:04:49.190272') OR locked_by = 'delayed_job.workless host:foo.local pid:63588') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 5

Note pid:63588 in the line above.

After stopping foreman/passenger again (with control-c), and again verifying that it was not running, I then searched for a delayed_job related process with:

-bash> ps -ef | grep delay
501 63588     1   0 10:17am ??         0:16.38 delayed_job.workless

So this was the culprit all along (note again the pid, 63588, in the line above). I then killed this runaway process:

-bash> kill 63588

(Note that it took about 15 seconds for it to die. You can verify its death by repeating the above ps command.)

Anyway, now delayed_job is being killed properly within about 15 seconds of the completion of a job.

abatko avatar Aug 13 '14 02:08 abatko

I am experiencing this again. The delayed_job process is not being stopped. It continues to poll every 5 seconds. Something is wrong.

abatko avatar Aug 21 '14 17:08 abatko

Where did you guys end up with this? Rails 4, yea or nea?

uberllama avatar Oct 10 '14 18:10 uberllama

About delayed Job not being stopped: http://blog.salsify.com/engineering/euthanize-exhausted-worker-processes-with-a-delayed-job-plugin

About Rails 4 support, ping @lostboy ?

davidakachaos avatar Oct 29 '14 10:10 davidakachaos

I've just tested workless 1.2.3 with rails 4.2.1 and hobby dyno. I first selected hobby web+worker. Then I added workless and scaled down worker dyno.

Between every step, I made sure worker ran at least once.

vfonic avatar Aug 28 '15 12:08 vfonic