Unicorn doesn't reload the app after the HUP signal
ruben.grunge84 at gmail.com
Fri Oct 1 20:57:42 EDT 2010
Hi folks, I've experimented a problem while deploying my app, I've
sent the HUP signal to the master process, I've checked everything is
ok: new master and workers are spawned and the old ones are
killed(I've checked the PIDs), but the new code deployed isn't
reflected in the living site, so I've to stop and start again unicorn
in order to see the new changes, here is my unicorn config:
rails_env = ENV['RAILS_ENV'] || 'production'
worker_processes (rails_env == 'production' ? 3 : 1)
"../../tmp/sockets/unicorn.sock")), :backlog => 2048
GC.copy_on_write_friendly = true
before_fork do |server, worker|
old_pid = RAILS_ROOT + '/tmp/pids/unicorn.pid.oldbin'
if File.exists?(old_pid) && server.pid != old_pid
rescue Errno::ENOENT, Errno::ESRCH
# someone else did our job for us
after_fork do |server, worker|
worker.user('peruautos', 'www-data') if Process.euid == 0
rescue => e
if RAILS_ENV == 'development'
STDERR.puts "couldn't change user, oh well"
I'm using unicorn 1.1.2 and rack 1.0.1
More information about the mongrel-unicorn