Comments (2)
Hey Victor,
Checkout he chapter on zero downtime deployment, the QUIT signal is sent
one the new processes are ready (implementation is in
https://github.com/TalkingQuickly/capistrano-3-rails-template/blob/master/config/deploy/shared/unicorn.rb.erb
).
This means the old processes are only stopped once the new ones are ready
to take requests so we can deploy new versions of the code seamlessly.
Cheers,
Ben
On Wednesday, 28 October 2015, Víctor M. Valenzuela <
[email protected]> wrote:
Hi, I bought your book and am testing out the provided unicorn_init script.
The issue with it is that stop doesn't always work - only force-stop does.
From the SIGNALS page:
USR2 - reexecute the running binary. A separate QUIT should be sent to the
original process once the child is verified to be up and runningThis additional QUIT signal doesn't seem to be sent by the unicorn_init
script:restart|reload)
sig USR2 && echo reloaded OK && exit 0
echo >&2 "Couldn't reload, starting '$CMD' instead"
run "$CMD"
;;Should the command consist of something like sig USR2 && oldsig QUIT?
Cheers - Victor
—
Reply to this email directly or view it on GitHub
#41.
Ben Dixon
+44 (0)2 032 894 803
+44 (0)7 762 845 249
http://www.twitter.com/TalkingQuickly
http://www.talkingquickly.co.uk
Dxnx Ltd Trading as Hills Bede
UK Registered Company Number: 6751002
Registered Address:
DXNX LTD
Techhub @ Google Campus
4 - 5 Bonhill Street
London
EC2A 4BX
from capistrano-3-rails-template.
Ahhhh got it, I didn't notice unicorn_init is meant to be used in conjunction with the before_fork after_fork mechanisms.
Some instructions out there such as https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-unicorn-and-nginx-on-ubuntu-14-04 completely omit this (their unicorn.rb has no before_fork/after_fork) :)
Thanks so much!
from capistrano-3-rails-template.
Related Issues (20)
- Don't know how to build task 'deploy:setup_config' HOT 4
- #{fetch(:full_app_name)} isn't working when creating symlinks in deploy.rb HOT 8
- Unicorn socket in /tmp vs. application shared tmp
- cap production deploy:setup_config problem HOT 1
- capistrano maintenance page
- check_revision.cap assumes remote being deployed from is origin
- Error on deploy HOT 3
- Error on reloading nginx HOT 1
- shouldn't database.yml be in the :config_files array? HOT 2
- compile_assets_locally tasks uses sudo HOT 1
- Error, when run cap production deploy:compile_assets_locally HOT 1
- Application folder
- Troubleshooting Zero Downtime Deployment for Unicorn HOT 1
- Choosing application role (web app db)
- Sidekiq dies, no monit recipe HOT 1
- nginx upstream sock path going to 'current_path/tmp' not to '/tmp' HOT 1
- Issue running `bundle exec cap production database:create`
- App Successfully Deployed but not Running When Visiting VPS Address
- logrotate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capistrano-3-rails-template.