Displaying 5 results from an estimated 5 matches for "old_pid".
Did you mean:
old_id
2012 Dec 04
2
403 Forbidden from nginx when unicorn started in debug mode
...uot;
stderr_path "/var/www/aceleathergoods/shared/log/unicorn.stderr.log"
stdout_path "/var/www/aceleathergoods/shared/log/unicorn.stdout.log"
end
before_fork do |server, worker|
if defined?(ActiveRecord::Base)
ActiveRecord::Base.connection.disconnect!
end
old_pid = "#{shared_path}/pids/unicorn.aceleathergoods.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
en...
2010 Oct 02
2
Unicorn doesn't reload the app after the HUP signal
...== ''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...
2009 Oct 02
0
[PATCH] configurator: update some migration examples
...y
+ # # phase out the old master process with SIGTTOU to avoid a
+ # # thundering herd (especially in the "preload_app false" case)
+ # # when doing a transparent upgrade. The last worker spawned
+ # # will then kill off the old master process with a SIGQUIT.
+ # old_pid = "#{server.config[:pid]}.oldbin"
+ # if old_pid != server.pid
+ # begin
+ # sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
+ # Process.kill(sig, File.read(old_pid).to_i)
+ # rescue Errno::ENOENT, Errno::ESRCH
+ # end
+ #
+ # #...
2011 May 19
2
unicorn doesn't restart properly after cap deploy (not using Bundler)
...stdout.log"
preload_app true
if GC.respond_to?(:copy_on_write_friendly=)
? GC.copy_on_write_friendly = true
end
before_fork do |server, worker|
? STDERR.puts "BEFORE FORK:"
? STDERR.puts ENV.inspect
? defined?(ActiveRecord::Base) and
? ? ActiveRecord::Base.connection.disconnect!
? if old_pid != server.pid
? ? begin
? ? ? sig = (worker.nr?+ 1) >= server.worker_processes ? :QUIT : :TTOU
? ? ? Process.kill(sig, File.read(old_pid).to_i)
? ? rescue Errno::ENOENT, Errno::ESRCH
? ? end
? end
end
after_fork do |server, worker|
? STDERR.puts "AFTER FORK:"
? STDERR.puts ENV.inspect...
2012 Jan 31
12
FreeBSD jail and unicorn
...my config:
---
listen "/home/deploy/staging/unicorn.sock"
pid "/home/deploy/staging/unicorn.pid"
preload_app true
stderr_path "/home/deploy/staging/unicorn.stderr.log"
stdout_path "/home/deploy/staging/unicorn.stdout.log"
before_fork do |server, worker|
old_pid = "#{server.config[:pid]}.oldbin"
if old_pid != server.pid
begin
process_id = File.read(old_pid).to_i
puts "sending QUIT to #{process_id}"
Process.kill :QUIT, process_id
rescue Errno::ENOENT, Errno::ESRCH
end
end
end
---
I''ve tried...