* Unicorn doesn't reload the app after the HUP signal
@ 2010-10-02 0:57 Rubén Dávila
2010-10-02 8:13 ` Eric Wong
0 siblings, 1 reply; 3+ messages in thread
From: Rubén Dávila @ 2010-10-02 0:57 UTC (permalink / raw)
To: mongrel-unicorn
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)
preload_app true
timeout 30
listen File.expand_path(File.join(__FILE__,
"../../tmp/sockets/unicorn.sock")), :backlog => 2048
if GC.respond_to?(:copy_on_write_friendly=)
GC.copy_on_write_friendly = true
end
before_fork do |server, worker|
old_pid = RAILS_ROOT + '/tmp/pids/unicorn.pid.oldbin'
if File.exists?(old_pid) && server.pid != old_pid
begin
Process.kill("QUIT", File.read(old_pid).to_i)
rescue Errno::ENOENT, Errno::ESRCH
# someone else did our job for us
end
end
end
after_fork do |server, worker|
ActiveRecord::Base.establish_connection
begin
worker.user('peruautos', 'www-data') if Process.euid == 0
rescue => e
if RAILS_ENV == 'development'
STDERR.puts "couldn't change user, oh well"
else
raise e
end
end
end
I'm using unicorn 1.1.2 and rack 1.0.1
Regards.
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unicorn doesn't reload the app after the HUP signal
2010-10-02 0:57 Unicorn doesn't reload the app after the HUP signal Rubén Dávila
@ 2010-10-02 8:13 ` Eric Wong
2010-10-03 0:25 ` Rubén Dávila
0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2010-10-02 8:13 UTC (permalink / raw)
To: unicorn list
Rubén Dávila <ruben.grunge84@gmail.com> wrote:
> 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)
> preload_app true
> timeout 30
> listen File.expand_path(File.join(__FILE__,
> "../../tmp/sockets/unicorn.sock")), :backlog => 2048
Hi Rubén,
Are you using cap or something else that makes symlinks during
deployment? It could've been started in an old release directory while
it didn't have the "current" symlink pointing to it. You can work
around this by putting:
working_directory "/path/to/app/current"
in your config file.
<snip>
> I'm using unicorn 1.1.2 and rack 1.0.1
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unicorn doesn't reload the app after the HUP signal
2010-10-02 8:13 ` Eric Wong
@ 2010-10-03 0:25 ` Rubén Dávila
0 siblings, 0 replies; 3+ messages in thread
From: Rubén Dávila @ 2010-10-03 0:25 UTC (permalink / raw)
To: unicorn list
Yes, I was using capistrano, very thanks.
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-03 0:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-02 0:57 Unicorn doesn't reload the app after the HUP signal Rubén Dávila
2010-10-02 8:13 ` Eric Wong
2010-10-03 0:25 ` Rubén Dávila
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).