Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 4 Support? #77

Open
taylorbrooks opened this issue Feb 17, 2014 · 6 comments
Open

Rails 4 Support? #77

taylorbrooks opened this issue Feb 17, 2014 · 6 comments

Comments

@taylorbrooks
Copy link

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

Are there known issues with this?

@ToniTornado
Copy link

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'

@abatko
Copy link

abatko commented Aug 13, 2014

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
Copy link

abatko commented Aug 21, 2014

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

@uberllama
Copy link

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

@davidakachaos
Copy link
Collaborator

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 ?

@vfonic
Copy link

vfonic commented Aug 28, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants