Alex Sharp <[email protected]> wrote: > Currently, on deploys we're sending HUP to the "old" master to reload > the config, and then we send it a USR2 to reload the app code. Is this > redundant -- i.e. does USR2 reload the unicorn config, or just the > application code? I am under the impression that USR2 forks a new > master from the old, and only reloads app code, and not the unicorn > config, but I just wanted to double check. Thanks.
It's redundant to send HUP before USR2 most of the time. USR2 does a fork+exec, so it replaces the forked process with a new one and rereads the config file. The only reason I can think of to send HUP before USR2 is to to update the path to Unicorn before fork+exec, normally USR2 defaults to using the same path it started with: This can be useful for changing between new versions/installations of Ruby: Unicorn::HttpServer::START_CTX[0] = "/home/ew/ruby-1.9.3/bin/unicorn" Unicorn::HttpServer::START_CTX[0] = "/home/ew/ruby-1.8.7/bin/unicorn" Unicorn::HttpServer::START_CTX[0] = "/home/ew/ruby-trunk/bin/unicorn" .. -- Eric Wong _______________________________________________ Unicorn mailing list - [email protected] http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying
