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

Killed Jobs are not requeued on Heroku #68

Closed
dim opened this issue Mar 6, 2012 · 5 comments
Closed

Killed Jobs are not requeued on Heroku #68

dim opened this issue Mar 6, 2012 · 5 comments

Comments

@dim
Copy link
Contributor

dim commented Mar 6, 2012

I looked at #51, but the re-queueing doesn't seem to work on Heroku (using HEAD). This is from the logs:

2012-03-06T08:21:42+00:00 app[worker.1]: 2012-03-06T08:21:42Z 1 TID-aeam4 INFO: Shutting down
2012-03-06T08:21:42+00:00 app[worker.1]: 2012-03-06T08:21:42Z 1 TID-ow6lw INFO: Pausing 5 seconds to allow workers to finish...
2012-03-06T08:21:52+00:00 heroku[worker.1]: Error R12 (Exit timeout) -> Process failed to exit within 10 seconds of SIGTERM
2012-03-06T08:21:52+00:00 heroku[worker.1]: Stopping process with SIGKILL
2012-03-06T08:21:54+00:00 heroku[worker.1]: Process exited with status 137

Unfortunately, nothing was re-queued. Every restart/deploy on heroku terminates the workers, meaning we are just loosing all running threads. Any ideas?

@mperham
Copy link
Collaborator

mperham commented Mar 6, 2012

Only workers who cleanly shut down have their jobs requeued.

@dim
Copy link
Contributor Author

dim commented Mar 6, 2012

Hmm, but how I do that, if I have long-running jobs? Ideally, I would have some sort of terminate call-back or an exception I could rescue in the worker's perform method. I also don't want to re-queue the whole job, but e.g. just the outstanding part. Any suggestions for an implementation? I don't mind trying one myself, just looking for ideas.

@fbjork
Copy link
Contributor

fbjork commented Mar 9, 2012

Agree. Jobs that get kill should be re-queued.

@mperham
Copy link
Collaborator

mperham commented Mar 11, 2012

Dupe of #51

@mperham mperham closed this as completed Mar 11, 2012
@be9
Copy link

be9 commented Mar 30, 2012

Workaround: put Celluloid.sleep(0) inside your long-running loop in Worker#perform.

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

4 participants