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

Sidekiq does not restart on deploy #11

Closed
pawel2105 opened this issue Apr 2, 2014 · 3 comments
Closed

Sidekiq does not restart on deploy #11

pawel2105 opened this issue Apr 2, 2014 · 3 comments

Comments

@pawel2105
Copy link

Sidekiq does not reliably respawn on each deploy when I define concurrency options for sidekiq.

My environment:
capistrano-sidekiq (0.1.3)
sidekiq (3.0.0)
capistrano (3.0.1)
rails ( 4.0.3)

I require the gem in my Capfile using require 'capistrano/sidekiq'.

My production deploy file has:

namespace :deploy do
  after :starting,  "sidekiq:stop"
  after :finishing, "sidekiq:cleanup"
  after :finishing, "sidekiq:respawn"
end

I have the following in config/sidekiq.yml:


---
:concurrency: 5

I've gisted the relevant output from the first deploy, as well as an example of subsequent deploys here. After the first deploy I can see the PID for sidekiq:

deploy     334  4.5 11.4 849724 117060 ?       Sl   19:51   0:02 sidekiq 3.0.0 myapp[0 of 5 busy]

Nothing appears after a subsequent deploy(s).

@pawel2105
Copy link
Author

I've tried another deploy and have seen that it spawns sidekiq again. This is after the forth attempt.

deploy 11036 0.7 11.7 851716 120084 ? Sl 20:02 0:03 sidekiq 3.0.0 myapp[0 of 5 busy]

@seuros
Copy link
Owner

seuros commented Apr 2, 2014

You don't need to create the hooks:

namespace :deploy do
  after :starting,  "sidekiq:stop"
  after :finishing, "sidekiq:cleanup"
  after :finishing, "sidekiq:respawn"
end

The gem will do it for you.

If you want to deactivate this behaviour , set :sidekiq_default_hooks to false

Let me know if that fix your issue.

@pawel2105
Copy link
Author

That did seem to fix it. Thanks.

seuros added a commit that referenced this issue Apr 9, 2014
fixes #11
fixes #10
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