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

avoiding duplicate unicorns starting with Upstart / Init #90

Open
danman01 opened this issue Jan 27, 2014 · 0 comments
Open

avoiding duplicate unicorns starting with Upstart / Init #90

danman01 opened this issue Jan 27, 2014 · 0 comments

Comments

@danman01
Copy link

Hey all,

I was getting two errors that bugged me for a while: my environment variable was being overwritten and I couldn't figure out how to set it within my deploy scripts (e.g. staging and production), and my unicorn process, after unicorn:duplicate, was running into an error and not being able to listen on the appropriate ports. I had to manually send a kill -QUIT to pidfile.oldbin after each deploy to start my new unicorn.

I finally figured out that my init scripts were starting unicorn during the unicorn:duplicate process, and my init scripts had a different environment specified than my deploy.rb.

Here's my setup (in a gist) to handle capistrano-unicorn with monit / upstart / init scripts: https://gist.github.com/danman01/8640750

I was thinking of adding this as a wiki entry as a warning to those who use these scripts (which I would imagine is nearly everyone), but want to verify this is a good enough solution for the wiki (there's nothing over there now - should it be a place for tips & best practices?)

Does anyone have experience running Monit with init / upstart and capistrano-unicorn all in perfect unison? Could you perhaps share your solution with me and we could create a wiki entry for others?

Thanks

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

1 participant