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

pidfile handling #44

Closed
rsluiters opened this issue Sep 15, 2014 · 7 comments
Closed

pidfile handling #44

rsluiters opened this issue Sep 15, 2014 · 7 comments

Comments

@rsluiters
Copy link

Sidekiq currently uses two different methods to generate the name for pidfiles: If only one Sidekiq process is running the file is only called sidekiq.pid, if two or more processes are running the pid files are called sidekiq-0.pid, sidekiq-1.pid, ... This leads to problems in deployment, as changing from 1 to 2 processes or back to 1 always leads to not stopped sidekiq workers.

So when e.g. changing the sidekiq_processes from 1 to 2 not the process stored in the sidekiq.pid is stopped but the non-existing processes sidekiq-0/1.pid. So the old process keeps running.

@seuros
Copy link
Owner

seuros commented Sep 15, 2014

  • stop sidekiq
  • change settings
  • start startkiq.

@rsluiters
Copy link
Author

This doesn't really work in continuous deployment (especially over different stages), so you would manually need to stop sidekiq and then deploy. As the number of processes is in the repo(deploy.rb) checking in a changed process count would not adapt sidekiq properly in the automatic deployment.

@seuros
Copy link
Owner

seuros commented Sep 15, 2014

Ok, send a PR. let have always sidekiq.pid, sidekiq-1.pid

@rsluiters
Copy link
Author

Ok, cool, this would solve the problem on scaling up. It just came into my mind that scaling down would likely still create problems, or not? If you have 4 processes and then go back to 3, would it stop all processes or only the 3 because of the sidekiq_processes set to 3 ?

@seuros
Copy link
Owner

seuros commented Sep 16, 2014

That the responsibility of the deployer, maybe adding note in the Readme will be enough.

@edslocomb
Copy link

capistrano-sidekiq is currently overriding the pidfile setting in sidekiq.yml, and that is not acceptable.

Can we please revert this change and send it back to w1mvy to fix it so that it will only behave in this (terrible) way if a config option is set?

@codener
Copy link

codener commented Jun 24, 2016

I opened a new issue on this: #156.

@seuros seuros closed this as completed Oct 8, 2022
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