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

Job was picked up after worker received TERM #812

Closed
abezzub opened this issue May 18, 2015 · 2 comments
Closed

Job was picked up after worker received TERM #812

abezzub opened this issue May 18, 2015 · 2 comments

Comments

@abezzub
Copy link

abezzub commented May 18, 2015

This weekend I was alerted that one of our jobs did not finish properly. It looks like Delayed Job picked up another job after receiving TERM signal. As I understand it is not supposed to happen:

https://github.com/collectiveidea/delayed_job/blob/master/lib/delayed/worker.rb#L151-L155

Logs:

May 15 13:41:11 app/worker.2: 2015-05-15T13:41:11-0700: [Worker(host:2ec6eceb-111f-49ff-b7b5-a3fa350236e2 pid:27)] 1 jobs processed at 16.2846 j/s, 0 failed
May 15 13:41:17 app/worker.2: 2015-05-15 13:41:16.948 26 LOG Stats: 6 req/s, in 3157 b/s, out 32720 b/s,query 23172 us
May 15 13:41:53 app/worker.2: [Worker(host:2ec6eceb-111f-49ff-b7b5-a3fa350236e2 pid:27)] Exiting...
May 15 13:41:53 app/worker.2: 2015-05-15T13:41:52-0700: [Worker(host:2ec6eceb-111f-49ff-b7b5-a3fa350236e2 pid:27)] Exiting...
May 15 13:41:54 app/worker.2: 2015-05-15 13:41:52.975 26 LOG Got SIGTERM, ignoring!
May 15 13:41:54 app/worker.2: [Worker(host:2ec6eceb-111f-49ff-b7b5-a3fa350236e2 pid:27)] Job ClassName#run_async_without_delay (id=16008133) RUNNING
May 15 13:41:54 app/worker.2: 2015-05-15T13:41:52-0700: [Worker(host:2ec6eceb-111f-49ff-b7b5-a3fa350236e2 pid:27)] Job ClassName#run_async_without_delay (id=16008133) RUNNING
May 15 13:41:55 app/worker.2:

I would expect Delayed Job to stop picking up new tasks after receiving TERM signal. Can someone help me look into this?

@abezzub
Copy link
Author

abezzub commented May 18, 2015

May 15 13:41:54 app/worker.2: 2015-05-15 13:41:52.975 26 LOG Got SIGTERM, ignoring!

this messages comes from PGBouncer and Heroku support tells me that it means that PGBouncer ignored TERM signal so other processes can receive it successfully.

@albus522
Copy link
Member

Closing stale

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

2 participants