Forum: Rails deployment USR2 to unicorn with preloaded app

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Cb8e3a1650513848561ca38f84399fa1?d=identicon&s=25 Fabrizio Regini (freegenie)
on 2012-09-19 23:33
Just happened to me with great surprise, that a Rails 3.2 served with
unicorn 4.3.1 did not reload after a USR2 signal.

In particular, this deploy was introducing ActiveAdmin. The admin routes
kept sending me 404 until I did a full stop and start.

So what are the cases in which the USR2 signal is not enough to reload
the app?
C0a77a40a22b1c40c3a83e6e0c2840be?d=identicon&s=25 Jeff Gran (jeffgran)
on 2012-09-21 00:26
We have had this same problem: we have a "hot deploy" system that
deploys the new code, and then sends the USR2 signal to the master
unicorn to restart. About 20% of the time (very rough estimate, no real
research into that number) the unicorn master does not restart (though,
annoyingly, the deploy still acts like it succeeded). They respond to
KILL or QUIT but not USR2.

Edit: we are running Rails 3.0 and Unicorn 4.3.1
8c7ac8ba0968d27dd1cac5b973177951?d=identicon&s=25 francesco agati (francescoagati)
on 2012-09-21 10:43
a github so che usavano questo script di god per monitorare unicorn.
6f9d88847d58da028b22fe5b425eb3e2?d=identicon&s=25 Johnny W. (johnny_w)
on 2012-10-11 10:14
In this case, you just  pass the old PID to kill

kill -s QUIT 23820 or you can take advantage of the fact this old PID is
stored a known file (referenced in your error message) alongside the
"current" PID, and execute:

kill -s QUIT `cat /home/user/app.git/tmp/`

Openwave has a highly experienced Ruby Rails Development team
This topic is locked and can not be replied to.