Git Product home page Git Product logo

Comments (2)

TalkingQuickly avatar TalkingQuickly commented on July 30, 2024

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 running

This 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.

vemv avatar vemv commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.