javascript disappears

Eric Wong normalperson at
Wed Aug 18 19:34:00 EDT 2010

Jimmy Soho <jimmy.soho at> wrote:
> PS. II: While I trying out various things I found that if I modified
> the before_exec hook, then deployed that code, send USR2, then it
> executes the before_exec hook of the old master, not the new master.
> So I then had to send a USR2 a second time to see the new code in
> before_exec taking effect. Is that intentional behaviour?

Yes.  USR2 doesn't reload the config file before by default.  Send a HUP
before USR2 if you want it to reload the config file.  Just keep in mind
if you add any new dependencies on your new deploy and HUP, things could
break, too, especially if you're using "preload_app true".

> PS. III: Haven't tested it yet, but in case a USR2 fails, and unicorn
> reverts back to the old master, does the old master then have the new
> environment variable values? Or does it run the before_exec hook again
> for the old master?

The old master doesn't get affected by environment (or any other local)
changes in before_exec.  before_exec only runs in the new master
process, so it can only affect the new master process (unless it sends
signals to the old master).

Eric Wong

More information about the mongrel-unicorn mailing list