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

Restarting sidekiq with upstart script #2482

Closed
panmari opened this issue Aug 12, 2015 · 11 comments
Closed

Restarting sidekiq with upstart script #2482

panmari opened this issue Aug 12, 2015 · 11 comments

Comments

@panmari
Copy link

panmari commented Aug 12, 2015

When trying to restart my sidekiq service configured after the example from here https://github.com/mperham/sidekiq/tree/master/examples/upstart, the sidekiq instances are not terminated properly. Only after killing them on my own via

kill $(ps aux | grep 'sidekiq' | awk '{print $2}')

I can successfully restart the job (with sudo service workers restart). I'm using Ubuntu 14.04.3 LTS. Is my configuration wrong or is this the expected behavior?

@mperham
Copy link
Collaborator

mperham commented Aug 15, 2015

You need to give us more precise data. Show us your exact .conf file, show us the exact command that is failing.

@panmari
Copy link
Author

panmari commented Aug 16, 2015

Here's my worker.conf, more or less a direct copy of the one in the trunk. Same goes for sidekiq.conf.

I get the following behavior:

sudo service workers restart
workers stop/waiting
start: Job failed to start

and when I then run ps aux | grep sidekiq, I see that all instances are still running (and have not restarted).

@mperham
Copy link
Collaborator

mperham commented Aug 16, 2015

Let's see your sidekiq.yml.

On Aug 16, 2015, at 05:50, panmari notifications@github.com wrote:

Here's my worker.conf, more or less a direct copy of the one in the trunk.

Same goes for sidekiq.conf.


Reply to this email directly or view it on GitHub.

@panmari
Copy link
Author

panmari commented Aug 17, 2015

---
:logfile: ./log/sidekiq.log
:concurrency:  5
:queues:
  - [high_priority, 7]
  - [default, 5]
  - [low_priority, 3]

@mperham
Copy link
Collaborator

mperham commented Aug 17, 2015

Hmm, can't explain why it's not working then. Looks ok to me.

On Aug 17, 2015, at 03:18, panmari notifications@github.com wrote:


:logfile: ./log/sidekiq.log
:concurrency: 5
:queues:

  • [high_priority, 7]
  • [default, 5]
  • [low_priority, 3]

    Reply to this email directly or view it on GitHub.

@panmari
Copy link
Author

panmari commented Aug 17, 2015

That's what I thought! Shouldn't an upstart job kill its child processes by default?

@mperham
Copy link
Collaborator

mperham commented Aug 17, 2015

Upstart sends TERM to the child process. If the child process forks away (e.g. by daemonizing itself), Upstart can lose track of the process. It's unfortunately complicated.

@mperham mperham closed this as completed Aug 28, 2015
@panmari
Copy link
Author

panmari commented Dec 17, 2015

This issue still persists for me. @mperham any ideas what could be causing this?

@panmari
Copy link
Author

panmari commented Dec 17, 2015

Wouldn't the fix descriped here help?

@mperham
Copy link
Collaborator

mperham commented Dec 17, 2015

I don't see how that fix is relevant to you. You're only exec'ing the bundle binary, which should work fine. Is your sidekiq.conf still the same?

@panmari
Copy link
Author

panmari commented Dec 17, 2015

yes

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